forked from extern/egroupware
fail if trying to unlink a directory
This commit is contained in:
parent
4c1e3a9e70
commit
df58928ac6
@ -527,7 +527,13 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
|
|||||||
if (!($stat = self::url_stat($path,STREAM_URL_STAT_LINK)) || !egw_vfs::check_access(dirname($path),egw_vfs::WRITABLE))
|
if (!($stat = self::url_stat($path,STREAM_URL_STAT_LINK)) || !egw_vfs::check_access(dirname($path),egw_vfs::WRITABLE))
|
||||||
{
|
{
|
||||||
self::_remove_password($url);
|
self::_remove_password($url);
|
||||||
if (self::LOG_LEVEL) error_log(__METHOD__."($url) (type=$type) permission denied!");
|
if (self::LOG_LEVEL) error_log(__METHOD__."($url) permission denied!");
|
||||||
|
return false; // no permission or file does not exist
|
||||||
|
}
|
||||||
|
if ($stat['mime'] == self::DIR_MIME_TYPE)
|
||||||
|
{
|
||||||
|
self::_remove_password($url);
|
||||||
|
if (self::LOG_LEVEL) error_log(__METHOD__."($url) is NO file!");
|
||||||
return false; // no permission or file does not exist
|
return false; // no permission or file does not exist
|
||||||
}
|
}
|
||||||
$stmt = self::$pdo->prepare('DELETE FROM '.self::TABLE.' WHERE fs_id=:fs_id');
|
$stmt = self::$pdo->prepare('DELETE FROM '.self::TABLE.' WHERE fs_id=:fs_id');
|
||||||
|
Loading…
Reference in New Issue
Block a user