diff --git a/src/Prints.php b/src/Prints.php index 0b6637e89..0feae6871 100644 --- a/src/Prints.php +++ b/src/Prints.php @@ -387,7 +387,7 @@ class Prints $name = replace($name, $replaces); $filename = sanitizeFilename($name); - $file = rtrim($directory, '/').'/'.$filename; + $file = ( empty($directory) ) ? $filename : rtrim($directory, '/').'/'.$filename; return [ 'name' => $name,