Skip to content

Commit 4b22dfa

Browse files
committed
normalize concrete file path
1 parent 8079d79 commit 4b22dfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Command/DumpCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
110110
$emptiedCacheDirectories[$cacheDirectory] = true;
111111
}
112112

113-
$concreteFilePath = rtrim($cacheDirectory, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . ltrim($packageAutoload->getRelativeFilePathByClassFqn($concreteClass->fqn), DIRECTORY_SEPARATOR);
113+
$concreteFilePath = $filesystem->normalizePath($cacheDirectory . $packageAutoload->getRelativeFilePathByClassFqn($concreteClass->fqn));
114114
$filesystem->ensureDirectoryExists(dirname($concreteFilePath));
115115
if (file_put_contents($concreteFilePath, $printer->printFile($concreteClass->ast)) === false) {
116116
throw new \RuntimeException(sprintf('Can\'t write into file "%s"', $concreteFilePath));

0 commit comments

Comments
 (0)