Fix issue in r_file_dump() when appending on unexistent files

This commit is contained in:
pancake 2020-04-14 19:19:32 +02:00
parent 2460e004e7
commit adfaf1aa25

View File

@ -343,7 +343,7 @@ R_API FILE *r_sandbox_fopen (const char *path, const char *mode) {
if (!epath) {
epath = expand_home (path);
}
if ((strchr (mode, 'w') || r_file_is_regular (epath))) {
if ((strchr (mode, 'w') || strchr (mode, 'a') || r_file_is_regular (epath))) {
#if __WINDOWS__
wchar_t *wepath = r_utf8_to_utf16 (epath);
if (!wepath) {