Skip to content

Commit c2ffd53

Browse files
committed
Move dirname() call up
1 parent 0479d87 commit c2ffd53

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/Filesystem/Filesystem.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -667,14 +667,14 @@ public function dumpFile(string $filename, $content)
667667
throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be string or resource, array given.', __METHOD__));
668668
}
669669

670+
$dir = \dirname($filename);
671+
670672
if (is_link($filename) && $linkTarget = $this->readlink($filename)) {
671-
$this->dumpFile(Path::makeAbsolute($linkTarget, \dirname($filename)), $content);
673+
$this->dumpFile(Path::makeAbsolute($linkTarget, $dir), $content);
672674

673675
return;
674676
}
675677

676-
$dir = \dirname($filename);
677-
678678
if (!is_dir($dir)) {
679679
$this->mkdir($dir);
680680
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy