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 e351c9f

Browse filesBrowse files
committed
merged branch clemens-tolboom/filedumper-backup (PR #4302)
Commits ------- 189874d FileDumper does no backup. Discussion ---------- FileDumper does no backup. Backup check path missed a '/'. So no backup was made. Removed the repeating path construction by replacing it by new variable. --------------------------------------------------------------------------- by travisbot at 2012-05-16T14:14:58Z This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1345963) (merged 189874d into 5314836).
2 parents e4eead3 + 189874d commit e351c9f
Copy full SHA for e351c9f

File tree

1 file changed

+4
-3
lines changed
Filter options

1 file changed

+4
-3
lines changed

‎src/Symfony/Component/Translation/Dumper/FileDumper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Dumper/FileDumper.php
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@ public function dump(MessageCatalogue $messages, $options = array())
3737
foreach ($messages->getDomains() as $domain) {
3838
$file = $domain.'.'.$messages->getLocale().'.'.$this->getExtension();
3939
// backup
40-
if (file_exists($options['path'].$file)) {
41-
copy($options['path'].$file, $options['path'].'/'.$file.'~');
40+
$fullpath = $options['path'].'/'.$file;
41+
if (file_exists($fullpath)) {
42+
copy($fullpath, $fullpath.'~');
4243
}
4344
// save file
44-
file_put_contents($options['path'].'/'.$file, $this->format($messages, $domain));
45+
file_put_contents($fullpath, $this->format($messages, $domain));
4546
}
4647
}
4748

0 commit comments

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