Skip to content

Commit 654af64

Browse files
Wrap file path in quotes to allow files with spaces
1 parent 53db71e commit 654af64

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ phpunit.xml
1212

1313
ImageMagick*.tar.gz
1414
/ImageMagick-*/
15+
16+
.idea

src/Command.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ private static function cleanPath(string $path, bool $rtrim = false): string
126126
$path = \rtrim($path, '/');
127127
}
128128

129+
$path = \trim($path, '"');
130+
$path = '"' . $path . '"';
131+
129132
return $path;
130133
}
131134

0 commit comments

Comments
 (0)