ID: 48771
Updated by: [email protected]
Reported By: bugs at thundercall dot dk
-Status: Open
+Status: Assigned
Bug Type: Filesystem function related
Operating System: Windows XP
PHP Version: 5.3CVS-2009-07-02 (snap)
-Assigned To:
+Assigned To: pajoye
New Comment:
Verified, missing a flag to allow that.
Previous Comments:
------------------------------------------------------------------------
[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