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

 ID:                 64565
 Updated by:         r...@php.net
 Reported by:        r...@php.net
 Summary:            copy doesn't report failure on partial copy
-Status:             Assigned
+Status:             Closed
 Type:               Bug
 Package:            Filesystem function related
 Operating System:   GNU/Linux
 PHP Version:        5.4.13
 Assigned To:        remi
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of remi
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=6b4148bc9705d2668dd8589009215a8eb3076f31
Log: Fixed Bug #64565 copy doesn't report failure on partial copy


Previous Comments:
------------------------------------------------------------------------
[2013-04-02 14:12:44] r...@php.net

Description:
------------
When destination folder of a copy haven't enough place, copy reports success 
instead of failure.


Test script:
---------------
<?php
$file = "somefile";
$tmpdir = "/mnt/test/";

echo "Source: ".($src=filesize($file))."\n";

for ($i=0 ; $i<7 ; $i++) {
  $res = copy($file, $tmpdir.$i);
  $dst = filesize($tmpdir.$i);
  echo "$i:".($res ? ($dst==$src ? "ok" : "ISSUE ($dst/$src)") : "ko")."\n";
}


Expected result:
----------------
Source: 107520
0:ok
1:ok
2:ok
3:ok
4:ko
5:ko
6:ko


Actual result:
--------------
Source: 107520
0:ok
1:ok
2:ok
3:ok
4:ISSUE (49152/107520)
5:ko
6:ko



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



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

Reply via email to