Commit 392752e6652003c4789d849232834237a9d13cc6
1 parent
01acabe0
KTC-7
"On document upload, KnowledgeTree server creates .tmp files in the Windows directory" Fixed. Temp file is now removed correctly. Reviewed By: Conrad git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@6597 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
0 deletions
ktwebdav/lib/KTWebDAVServer.inc.php
| @@ -1261,6 +1261,7 @@ class KTWebDAVServer extends HTTP_WebDAV_Server | @@ -1261,6 +1261,7 @@ class KTWebDAVServer extends HTTP_WebDAV_Server | ||
| 1261 | 1261 | ||
| 1262 | if(PEAR::isError($oDocument)) { | 1262 | if(PEAR::isError($oDocument)) { |
| 1263 | $this->ktwebdavLog("oDocument ERROR: " . $oDocument->getMessage(), 'info', true); | 1263 | $this->ktwebdavLog("oDocument ERROR: " . $oDocument->getMessage(), 'info', true); |
| 1264 | + unlink($sTempFilename); | ||
| 1264 | return "409 Conflict - " . $oDocument->getMessage(); | 1265 | return "409 Conflict - " . $oDocument->getMessage(); |
| 1265 | } | 1266 | } |
| 1266 | 1267 | ||
| @@ -1310,11 +1311,13 @@ class KTWebDAVServer extends HTTP_WebDAV_Server | @@ -1310,11 +1311,13 @@ class KTWebDAVServer extends HTTP_WebDAV_Server | ||
| 1310 | 1311 | ||
| 1311 | if(PEAR::isError($oDocument)) { | 1312 | if(PEAR::isError($oDocument)) { |
| 1312 | $this->ktwebdavLog("oDocument ERROR: " . $oDocument->getMessage(), 'info', true); | 1313 | $this->ktwebdavLog("oDocument ERROR: " . $oDocument->getMessage(), 'info', true); |
| 1314 | + unlink($sTempFilename); | ||
| 1313 | return "409 Conflict - " . $oDocument->getMessage(); | 1315 | return "409 Conflict - " . $oDocument->getMessage(); |
| 1314 | } | 1316 | } |
| 1315 | 1317 | ||
| 1316 | $this->ktwebdavLog("oDocument is " . print_r($oDocument, true), 'info', true); | 1318 | $this->ktwebdavLog("oDocument is " . print_r($oDocument, true), 'info', true); |
| 1317 | 1319 | ||
| 1320 | + unlink($sTempFilename); | ||
| 1318 | return "201 Created"; | 1321 | return "201 Created"; |
| 1319 | 1322 | ||
| 1320 | } else return "423 Locked - KTWebDAV is in SafeMode"; | 1323 | } else return "423 Locked - KTWebDAV is in SafeMode"; |