Skip to content

Commit

Permalink
Update comments / documentation.
Browse files Browse the repository at this point in the history
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
  • Loading branch information
Ericson2314 and roberth authored Aug 8, 2024
1 parent 6c861b9 commit 0646b6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/libutil/file-system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/libutil/file-system.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 0646b6c

Please sign in to comment.