diff options
author | Brian Havard <bjh@apache.org> | 2005-06-29 11:46:34 +0000 |
---|---|---|
committer | Brian Havard <bjh@apache.org> | 2005-06-29 11:46:34 +0000 |
commit | 7d8caae3c74495d043e7e37c5da26e394c7897c4 (patch) | |
tree | 490faa55f15f2c01b93c94c3e8aeb9039195fc82 | |
parent | 7355c0a4b47cb6f476675e13f5706b932fcfd1d5 (diff) | |
download | apr-7d8caae3c74495d043e7e37c5da26e394c7897c4.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: https://svn.apache.org/repos/asf/apr/apr/branches/1.1.x@202350 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 3ece06224..910084ef6 100644 --- a/file_io/os2/open.c +++ b/file_io/os2/open.c @@ -158,7 +158,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) { |