Added support for filenames with spaces by using escapeshellarg() to evaluate and treat string as literal.
This commit is contained in:
parent
9db3d31cc0
commit
b2658d7e01
@ -87,8 +87,11 @@ class Import extends Module {
|
||||
|
||||
$out = '';
|
||||
$ret = '';
|
||||
$file = escapeshellarg($file);
|
||||
$cmd = $osmv . " $file " . LYCHEE_DATA . $tmpdirname;
|
||||
|
||||
@exec($cmd, $out, $ret);
|
||||
|
||||
@exec($osmv . ' ' . $file . ' ' . LYCHEE_DATA . $tmpdirname, $out, $ret);
|
||||
if (isset($ret)&&($ret>0)) Log::error($database, __METHOD__, __LINE__, "Failed to move directory or file ($ret):" . $file);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user