diff options
author | bjh <bjh@13f79535-47bb-0310-9956-ffa450edef68> | 2005-06-29 11:54:13 +0000 |
---|---|---|
committer | bjh <bjh@13f79535-47bb-0310-9956-ffa450edef68> | 2005-06-29 11:54:13 +0000 |
commit | efe3796dfb5d7a6222bc5fc5903e4936c3425fcd (patch) | |
tree | 9161f2e6a54afcd088113796f696e062d501c415 | |
parent | 9d3614342844c1b813470b5f2dbc75a54c63a94a (diff) | |
download | libapr-efe3796dfb5d7a6222bc5fc5903e4936c3425fcd.tar.gz |
OS/2: Using apr_file_rename() to replace one file with another doesn't work
on some types of network drive as the file system driver returns a different
error code when an attempt is made to rename to an existing file name.
Allow for this error code, ERROR_ALREADY_EXISTS.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.0.x@202352 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | file_io/os2/open.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/file_io/os2/open.c b/file_io/os2/open.c index fb5f74007..c288402d8 100644 --- a/file_io/os2/open.c +++ b/file_io/os2/open.c @@ -157,7 +157,7 @@ APR_DECLARE(apr_status_t) apr_file_rename(const char *from_path, const char *to_ { ULONG rc = DosMove(from_path, to_path); - if (rc == ERROR_ACCESS_DENIED) { + if (rc == ERROR_ACCESS_DENIED || rc == ERROR_ALREADY_EXISTS) { rc = DosDelete(to_path); if (rc == 0 || rc == ERROR_FILE_NOT_FOUND) { |