summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbjh <bjh@13f79535-47bb-0310-9956-ffa450edef68>2005-06-29 11:46:34 +0000
committerbjh <bjh@13f79535-47bb-0310-9956-ffa450edef68>2005-06-29 11:46:34 +0000
commitcad002045a38b38a25ac265ce05bd2b7e7813794 (patch)
tree490faa55f15f2c01b93c94c3e8aeb9039195fc82
parent66e201f131a4a833f47dc2f87b0f0f31f5948a26 (diff)
downloadlibapr-cad002045a38b38a25ac265ce05bd2b7e7813794.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.1.x@202350 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--file_io/os2/open.c2
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) {