diff options
author | Vincent Torri <vincent.torri@gmail.com> | 2020-10-06 15:09:31 +0100 |
---|---|---|
committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2020-10-08 10:10:30 +0200 |
commit | 86b5ea5af8d32f5b4160271f66007d1d079dfe4d (patch) | |
tree | e97a2067b4427f29b4437908b84043da2a99150f | |
parent | ac6528c9ec463b0248aaad964ce8042127ef2d90 (diff) | |
download | efl-86b5ea5af8d32f5b4160271f66007d1d079dfe4d.tar.gz |
Ecore_file: on Windows, fix errno value when dst exists.
Summary: This also fixes the saving of elementary_config file
Test Plan: execution of elementary_config
Reviewers: jptiz, raster
Reviewed By: raster
Subscribers: johnny1337, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12165
-rw-r--r-- | src/lib/ecore_file/ecore_file.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c index 83fca2600e..66bdfe542e 100644 --- a/src/lib/ecore_file/ecore_file.c +++ b/src/lib/ecore_file/ecore_file.c @@ -514,11 +514,11 @@ ecore_file_mv(const char *src, const char *dst) } } #ifdef _WIN32 - if (errno == EEXIST) - { - struct _stat s; - _stat(dst, &s); - if (_S_IFREG & s.st_mode) + if (errno == ENOENT) + { + struct _stat s; + _stat(dst, &s); + if (_S_IFREG & s.st_mode) { ecore_file_unlink(dst); if (rename(src, dst)) @@ -526,7 +526,7 @@ ecore_file_mv(const char *src, const char *dst) return EINA_TRUE; } } - } + } #endif goto FAIL; } |