Req #29812 [Com]: rename() don't overwrite existing files at windows (as at linux)

From: Date: Sat, 07 Dec 2013 14:08:28 +0000
Subject: Req #29812 [Com]: rename() don't overwrite existing files at windows (as at linux)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-183193@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=29812&edit=1

 ID:                 29812
 Comment by:         cmbecker69 at gmx dot de
 Reported by:        melker at kuh dot at
 Summary:            rename() don't overwrite existing files at windows
                     (as at linux)
 Status:             Open
 Type:               Feature/Change Request
 Package:            Feature/Change Request
 Operating System:   winxp
 PHP Version:        4.3.8
 Block user comment: N
 Private report:     N

 New Comment:

This request is a related to bug report #41985[1].

The issue is solved since PHP 5.3.

[1] <https://bugs.php.net/bug.php?id=41985>


Previous Comments:
------------------------------------------------------------------------
[2013-03-05 11:16:47] tom at r dot je

This isn't restricted to Windows XP but also affects other versions. I've tested Windows
Vista and Windows Server 2008, both have this same problem.

------------------------------------------------------------------------
[2004-08-24 12:36:20] melker at kuh dot at

Description:
------------
Hi,

rename ( 'file1', 'file2' ); 

behaviour at linux:

If there is a 'file2', the file2 will be overwritten by file1.

at windows xp:
If there is a 'file2', a warning is given and the file2 isn't overwritten with file1.

Reproduce code:
---------------
rename ( 'file1', 'file2' ); 



Expected result:
----------------
I would expect, that rename() works with the same behaviour at all operating systems.

So, please overwrite existing files or give a warning at all os.

Actual result:
--------------
rename()
at linux, existing files will be overwritten, at winxp, the rename-process fails, a php-warning is
given.


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=29812&edit=1


Thread (4 messages)

« previous php.bugs (#183193) next »