LSsession : fix getTmpFileURL when tmp directory is a symbolic link

This commit is contained in:
Benjamin Renard 2020-05-06 21:23:07 +02:00
parent 041e38e131
commit 6ba8f2732c

View file

@ -2256,8 +2256,8 @@ class LSsession {
**/ **/
public static function getTmpFileURL($value) { public static function getTmpFileURL($value) {
$path = self :: getTmpFile($value); $path = self :: getTmpFile($value);
if (substr($path, 0, strlen(LS_ROOT_DIR)) == LS_ROOT_DIR) if ($path && is_file($path))
return substr($path, strlen(LS_ROOT_DIR)+1); return "tmp/".basename($path);
return False; return False;
} }