Page MenuHomePhorge

D4376.1776310998.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D4376.1776310998.diff

diff --git a/lib/ext/Syncroton/Command/FolderCreate.php b/lib/ext/Syncroton/Command/FolderCreate.php
--- a/lib/ext/Syncroton/Command/FolderCreate.php
+++ b/lib/ext/Syncroton/Command/FolderCreate.php
@@ -86,6 +86,18 @@
return;
}
+ // Check if the folder already exists
+ try {
+ $this->_folderBackend->getFolder($this->_device, $folder);
+ // The folder already exists
+ $this->_status = Syncroton_Command_FolderSync::STATUS_FOLDER_EXISTS;
+ return;
+ } catch (Syncroton_Exception_NotFound $e) {
+ // This is the normal case
+ if ($this->_logger instanceof Zend_Log)
+ $this->_logger->debug(__METHOD__ . '::' . __LINE__ . " " . $e->getMessage());
+ }
+
try {
$dataController = Syncroton_Data_Factory::factory($folder->class, $this->_device, $this->_syncTimeStamp);
@@ -102,12 +114,12 @@
}
} catch (Syncroton_Exception_Status $e) {
if ($this->_logger instanceof Zend_Log)
- $this->_logger->debug(__METHOD__ . '::' . __LINE__ . " " . $e->getMessage());
+ $this->_logger->info(__METHOD__ . '::' . __LINE__ . " " . $e->getMessage());
$this->_status = $e->getCode();
} catch (Exception $e) {
if ($this->_logger instanceof Zend_Log)
- $this->_logger->debug(__METHOD__ . '::' . __LINE__ . " " . $e->getMessage());
+ $this->_logger->warn(__METHOD__ . '::' . __LINE__ . " " . $e->getMessage());
$this->_status = Syncroton_Command_FolderSync::STATUS_UNKNOWN_ERROR;
}

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 16, 3:43 AM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18856318
Default Alt Text
D4376.1776310998.diff (1 KB)

Event Timeline