From cad002045a38b38a25ac265ce05bd2b7e7813794 Mon Sep 17 00:00:00 2001 From: bjh Date: Wed, 29 Jun 2005 11:46:34 +0000 Subject: 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 --- file_io/os2/open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- cgit v1.2.1