Fix link from VFS sometimes doesn't work

This commit is contained in:
nathan 2024-11-18 11:28:54 -07:00
parent 50db13ea09
commit 0a4b08a170

View File

@ -314,7 +314,7 @@ class Link extends Etemplate\Widget
}
else
{
if(!str_ends_with($dest_file, '/') && count($files) == 1)
if($dest_file && !str_ends_with($dest_file, '/') && count($files) == 1)
{
// 1 file to a specific filename, overwrite if already there
if(file_exists(Api\Link::vfs_path($app, $id)))