You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Filesystem.php
+4-7Lines changed: 4 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -54,12 +54,12 @@ public function copy($originFile, $targetFile, $overwriteNewerFiles = false)
54
54
55
55
if ($doCopy) {
56
56
// https://bugs.php.net/bug.php?id=64634
57
-
if (false === $source = @fopen($originFile, 'r')) {
57
+
if (false === $source = @fopen($originFile, 'rb')) {
58
58
thrownewIOException(sprintf('Failed to copy "%s" to "%s" because source file could not be opened for reading.', $originFile, $targetFile), 0, null, $originFile);
59
59
}
60
60
61
61
// Stream context created to allow files overwrite when using FTP stream wrapper - disabled by default
thrownewIOException(sprintf('Failed to copy "%s" to "%s" because target file could not be opened for writing.', $originFile, $targetFile), 0, null, $originFile);
64
64
}
65
65
@@ -557,10 +557,7 @@ public function mirror($originDir, $targetDir, \Traversable $iterator = null, $o
0 commit comments