From 392752e6652003c4789d849232834237a9d13cc6 Mon Sep 17 00:00:00 2001 From: Kevin Fourie Date: Tue, 29 May 2007 13:33:35 +0000 Subject: [PATCH] KTC-7 "On document upload, KnowledgeTree server creates .tmp files in the Windows directory" Fixed. Temp file is now removed correctly. --- ktwebdav/lib/KTWebDAVServer.inc.php | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) diff --git a/ktwebdav/lib/KTWebDAVServer.inc.php b/ktwebdav/lib/KTWebDAVServer.inc.php index 9928e46..d2a9d6b 100644 --- a/ktwebdav/lib/KTWebDAVServer.inc.php +++ b/ktwebdav/lib/KTWebDAVServer.inc.php @@ -1261,6 +1261,7 @@ class KTWebDAVServer extends HTTP_WebDAV_Server if(PEAR::isError($oDocument)) { $this->ktwebdavLog("oDocument ERROR: " . $oDocument->getMessage(), 'info', true); + unlink($sTempFilename); return "409 Conflict - " . $oDocument->getMessage(); } @@ -1310,11 +1311,13 @@ class KTWebDAVServer extends HTTP_WebDAV_Server if(PEAR::isError($oDocument)) { $this->ktwebdavLog("oDocument ERROR: " . $oDocument->getMessage(), 'info', true); + unlink($sTempFilename); return "409 Conflict - " . $oDocument->getMessage(); } $this->ktwebdavLog("oDocument is " . print_r($oDocument, true), 'info', true); + unlink($sTempFilename); return "201 Created"; } else return "423 Locked - KTWebDAV is in SafeMode"; -- libgit2 0.21.4