mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-02 19:26:43 +00:00
Fix issue in r_file_dump() when appending on unexistent files
This commit is contained in:
parent
2460e004e7
commit
adfaf1aa25
@ -343,7 +343,7 @@ R_API FILE *r_sandbox_fopen (const char *path, const char *mode) {
|
|||||||
if (!epath) {
|
if (!epath) {
|
||||||
epath = expand_home (path);
|
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__
|
#if __WINDOWS__
|
||||||
wchar_t *wepath = r_utf8_to_utf16 (epath);
|
wchar_t *wepath = r_utf8_to_utf16 (epath);
|
||||||
if (!wepath) {
|
if (!wepath) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user