diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-11-06 15:58:56 +0100 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-11-06 15:58:56 +0100 |
commit | 5776af30e84356dade6b644a56dce2094ecb99eb (patch) | |
tree | 985a3325bdf75e341d70b2305c923dfbb2064972 /include/attach.php | |
parent | 91f751d10531e73078f7efb4efa1f5e215a8f871 (diff) | |
parent | 4ca0c2cfd14df5e2b6e9c7f59a10628f7653d6a4 (diff) | |
download | volse-hubzilla-5776af30e84356dade6b644a56dce2094ecb99eb.tar.gz volse-hubzilla-5776af30e84356dade6b644a56dce2094ecb99eb.tar.bz2 volse-hubzilla-5776af30e84356dade6b644a56dce2094ecb99eb.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/attach.php')
-rw-r--r-- | include/attach.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/attach.php b/include/attach.php index 8a568d8e1..36b971712 100644 --- a/include/attach.php +++ b/include/attach.php @@ -1270,9 +1270,13 @@ function attach_delete($channel_id, $resource, $is_photo = 0) { ); if($y) { - $f = 'store/' . $channel_address . '/' . $y[0]['data']; - if(is_dir($y[0]['data'])) - @rmdir($y[0]['data']); + if(strpos($y[0]['data'],'store') === false) + $f = 'store/' . $channel_address . '/' . $y[0]['data']; + else + $f = $y[0]['data']; + + if(is_dir($f)) + @rmdir($f); elseif(file_exists($f)) unlink($f); } |