summaryrefslogtreecommitdiff
path: root/plugins/kolab_files/lib/kolab_files_observer.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/kolab_files/lib/kolab_files_observer.php')
-rw-r--r--plugins/kolab_files/lib/kolab_files_observer.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/kolab_files/lib/kolab_files_observer.php b/plugins/kolab_files/lib/kolab_files_observer.php
index d1a1b4e..535fe79 100644
--- a/plugins/kolab_files/lib/kolab_files_observer.php
+++ b/plugins/kolab_files/lib/kolab_files_observer.php
@@ -19,9 +19,8 @@ class kolab_files_observer implements SplObserver
switch ($event['name']) {
case 'receivedHeaders':
- $target = $this->dir . DIRECTORY_SEPARATOR . $this->file;
- if (!($this->fp = @fopen($target, 'wb'))) {
- throw new Exception("Cannot open target file '{$target}'");
+ if (!$this->file || !($this->fp = @fopen($this->file, 'wb'))) {
+ throw new Exception("Cannot open target file '{$this->file}'");
}
break;