ID:               48771
 Updated by:       [email protected]
 Reported By:      bugs at thundercall dot dk
-Status:           Assigned
+Status:           Closed
 Bug Type:         Filesystem function related
 Operating System: win32 only - Windows XP
 PHP Version:      5.3CVS-2009-07-02 (snap)
 Assigned To:      pajoye
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2009-07-02 09:14:32] [email protected]

Verified, missing a flag to allow that.

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

[2009-07-02 07:55:34] bugs at thundercall dot dk

$handle = rename($old_file, $new_file);

$old_dir & $new_dir was meant for is_dir() checking before moving
files,... but as this test didn't needed that, i forgot to remove it
from the rename(),.. merged it into $old_file & $new_file.

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

[2009-07-02 07:51:53] bugs at thundercall dot dk

Description:
------------
When using rename() from one drive to another drive PHP5.3 & Snap 5.3.1
2009-07-02 fails with error: "No error" and doesn't move the file...

Reproduce code:
---------------
<?php

$old_file = "C:\\Temp\\file.txt";
$new_file = "D:\\Temp\\newfile.txt";

$handle = rename($old_dir.$old_file, $new_dir.$new_file);
if ($handle)
        print "Wuhoo!!";
else
        print "Do'h!";

// $handle = rename($new_dir.$new_file, $old_dir.$old_file); // restore
for reruns
?>

Expected result:
----------------
Wuhoo!!

Actual result:
--------------
Warning: rename(C:\Temp\file.txt,D:\Temp\newfile.txt)
[function.rename]: No error in D:\home\main\test\rename\index.php on
line 6
Do'h!


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


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

Reply via email to