Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 040a9ab

Browse filesBrowse files
chs2fabpot
authored andcommitted
dumpFile(), preserve existing file permissions
1 parent 3effed8 commit 040a9ab
Copy full SHA for 040a9ab

File tree

1 file changed

+3
-0
lines changed
Filter options

1 file changed

+3
-0
lines changed

‎src/Symfony/Component/Filesystem/Filesystem.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Filesystem/Filesystem.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,10 @@ public function dumpFile($filename, $content, $mode = 0666)
516516
}
517517

518518
$this->chmod($tmpFile, $mode);
519+
} else {
520+
@chmod($tmpFile, file_exists($filename) ? fileperms($filename) : 0666 & ~umask());
519521
}
522+
520523
$this->rename($tmpFile, $filename, true);
521524
}
522525

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.