summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbjh <bjh@13f79535-47bb-0310-9956-ffa450edef68>2005-06-29 11:57:54 +0000
committerbjh <bjh@13f79535-47bb-0310-9956-ffa450edef68>2005-06-29 11:57:54 +0000
commitf512114368a7034ac29e3840b1c15cc2b7330e3e (patch)
tree9d9da3f424c5f73286a84fbb72d7d23cf68107c3
parent9d28c914be8882ca97271a856efeca9f6fc4e185 (diff)
downloadlibapr-f512114368a7034ac29e3840b1c15cc2b7330e3e.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/0.9.x@202353 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 1c0f0622e..6b28307f4 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) {