Update comments / documentation.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This commit is contained in:
John Ericson 2024-08-07 22:29:56 -05:00 committed by GitHub
parent 6c861b9c51
commit 0646b6cd61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -688,6 +688,7 @@ void moveFile(const Path & oldName, const Path & newName)
bool isExecutableFileAmbient(const fs::path & exe) {
// Check file type, because directory being executable means
// something completely different.
// `is_regular_file` follows symlinks before checking.
return std::filesystem::is_regular_file(exe)
&& access(exe.string().c_str(),
#ifdef WIN32

View file

@ -265,7 +265,7 @@ Path defaultTempDir();
/**
* Interpret `exe` as a location in the ambient file system and return
* whether it exists AND is executable.
* whether it resolves to a file that is executable.
*/
bool isExecutableFileAmbient(const std::filesystem::path & exe);