Skip to content

Commit

Permalink
Support data url as source in fs:copy
Browse files Browse the repository at this point in the history
  • Loading branch information
joostfaassen committed May 15, 2016
1 parent e554f4f commit 493783f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Command/FsCopyCommand.php
Expand Up @@ -54,9 +54,11 @@ public function execute(InputInterface $input, OutputInterface $output)
$group = $input->getOption('group');
$mask = $input->getOption('mask');

$output->WriteLn("Copying $src to $dest");
if (!file_exists($src)) {
throw new RuntimeException("Source file not exists: " . $src);
//$output->WriteLn("Copying $src to $dest");
if (substr($src, 0, 5)!='data:') {
if (!file_exists($src)) {
throw new RuntimeException("Source file not exists: " . $src);
}
}
$dirname = dirname($dest);
if (!file_exists($dirname) && !in_array($dirname, ['.', '..'])) {
Expand Down

0 comments on commit 493783f

Please sign in to comment.