mike-jumper opened a new pull request #290: URL: https://github.com/apache/guacamole-server/pull/290
There are a couple issues with `access()` and `remove()` as they are currently used within guacenc: * If checking `access()` prior to attempting `remove()` in order to avoid a failed removal, there is no guarantee that the status of the file pending removal will not change between the calls. This sort of check should be made atomically. A good way to do this is through just attempting the removal and handling the possible failure. If the file does not exist, that is one of the distinct types of failures that will be reported. * `remove()` is useful when the type of file is unknown, as it will automatically choose between `unlink()` and `rmdir()` depending on whether the file is a directory. As we know ahead of time that this file will never be a directory, it is more appropriate to use `unlink()`. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org