Commit 76b2313b authored by Morph's avatar Morph
Browse files

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.
parent cf0b9d1d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment