diff options
author | Vincent Torri <vincent.torri@gmail.com> | 2020-10-06 15:09:31 +0100 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2020-10-06 15:09:31 +0100 |
commit | 0a08a860a87fc99e712be1ec72d91a5536c856c2 (patch) | |
tree | b2b8cf3f7518ac23282767a04ca291e1fb9a538e /src/lib/ecore_file/ecore_file.c | |
parent | 387a7200916a02f4f51ff18f674d1138c8550a27 (diff) |
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
Diffstat (limited to '')
-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) | |||
514 | } | 514 | } |
515 | } | 515 | } |
516 | #ifdef _WIN32 | 516 | #ifdef _WIN32 |
517 | if (errno == EEXIST) | 517 | if (errno == ENOENT) |
518 | { | 518 | { |
519 | struct _stat s; | 519 | struct _stat s; |
520 | _stat(dst, &s); | 520 | _stat(dst, &s); |
521 | if (_S_IFREG & s.st_mode) | 521 | if (_S_IFREG & s.st_mode) |
522 | { | 522 | { |
523 | ecore_file_unlink(dst); | 523 | ecore_file_unlink(dst); |
524 | if (rename(src, dst)) | 524 | if (rename(src, dst)) |
@@ -526,7 +526,7 @@ ecore_file_mv(const char *src, const char *dst) | |||
526 | return EINA_TRUE; | 526 | return EINA_TRUE; |
527 | } | 527 | } |
528 | } | 528 | } |
529 | } | 529 | } |
530 | #endif | 530 | #endif |
531 | goto FAIL; | 531 | goto FAIL; |
532 | } | 532 | } |