From 8df754fed3593c3eee098edef95aef05921ae20f Mon Sep 17 00:00:00 2001 From: Neil Blakey-Milner Date: Tue, 30 May 2006 15:22:48 +0000 Subject: [PATCH] Fix deletion on expunge for the hashed layout. --- lib/storage/ondiskhashedstoragemanager.inc.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/storage/ondiskhashedstoragemanager.inc.php b/lib/storage/ondiskhashedstoragemanager.inc.php index 0e30b49..e7d0d42 100644 --- a/lib/storage/ondiskhashedstoragemanager.inc.php +++ b/lib/storage/ondiskhashedstoragemanager.inc.php @@ -260,17 +260,12 @@ class KTOnDiskHashedStorageManager extends KTStorageManager { $oConfig =& KTConfig::getSingleton(); $sCurrentPath = $this->getPath($oDocument); - // check if the deleted folder exists and create it if not - $sDeletedPrefix = sprintf("%s/Deleted", $oConfig->get('urls/documentRoot')); $sDocumentRoot = $oConfig->get('urls/documentRoot'); $aVersions = KTDocumentContentVersion::getByDocument($oDocument); foreach ($aVersions as $oVersion) { - $sPath = sprintf("Deleted/%s-%s", $oVersion->getId(), $oVersion->getFileName()); - $sFullPath = sprintf("%s/%s", $sDocumentRoot, $sPath); - if (file_exists($sFullPath)) { - unlink($sFullPath); - } + $sPath = sprintf('%s/%s', $sDocumentRoot, $oVersion->getStoragePath()); + @unlink($sPath); } return true; } -- libgit2 0.21.4