1
0
Fork 0
forked from suyu/suyu
suyu/src/common/fs
Morph 76b2313b25 common: fs: Amend IsFile check in FileOpen / (Write/Append)StringToFile
This check was preventing files with the Write or Append file access modes from being created, as per the documented behavior in FileAccessMode.
This amends the check to test for the existence of a filesystem object prior to checking whether it is a regular file.
Thanks to liushuyu for pointing out that removing the check altogether would not guard against attempting to open non-regular files such as directories, symlinks, FIFO (pipes), sockets, block devices, or character devices.
The documentation has also been updated for these functions to clarify that a file refers to a regular file.
2021-06-22 15:06:58 -04:00
..
file.cpp common: fs: Amend IsFile check in FileOpen / (Write/Append)StringToFile 2021-06-22 15:06:58 -04:00
file.h common: fs: Amend IsFile check in FileOpen / (Write/Append)StringToFile 2021-06-22 15:06:58 -04:00
fs.cpp common: fs: Amend IsFile check in FileOpen / (Write/Append)StringToFile 2021-06-22 15:06:58 -04:00
fs.h common: fs: Amend IsFile check in FileOpen / (Write/Append)StringToFile 2021-06-22 15:06:58 -04:00
fs_paths.h common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270) 2021-05-25 19:32:56 -04:00
fs_types.h common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270) 2021-05-25 19:32:56 -04:00
fs_util.cpp common: fs: fs_util: Move PathToUTF8String to fs_util 2021-06-02 00:26:26 -04:00
fs_util.h common: fs: fs_util: Move PathToUTF8String to fs_util 2021-06-02 00:26:26 -04:00
path_util.cpp common: fs: fs_util: Move PathToUTF8String to fs_util 2021-06-02 00:26:26 -04:00
path_util.h common/fs/path_util: Remove [[nodiscard]] from function with void return 2021-06-08 19:36:09 -04:00