summaryrefslogtreecommitdiffstats
path: root/lib/private/tempmanager.php
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-03-19 15:35:36 +0100
committerOlivier Paroz <github@oparoz.com>2015-03-19 16:09:16 +0100
commitf890c3ffb1b7f7f1b744b37426993010e0c39138 (patch)
tree72848f7dccca74976ac480a223cf076f4ad3a4cc /lib/private/tempmanager.php
parent60b1643f02a2588d90fa77346bc377f5c1db8fbe (diff)
downloadnextcloud-server-f890c3ffb1b7f7f1b744b37426993010e0c39138.tar.gz
nextcloud-server-f890c3ffb1b7f7f1b744b37426993010e0c39138.zip
Make the method compatible with all types of extensions
Fix existing tests
Diffstat (limited to 'lib/private/tempmanager.php')
-rw-r--r--lib/private/tempmanager.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/tempmanager.php b/lib/private/tempmanager.php
index 213d57b2e28..fa23749b708 100644
--- a/lib/private/tempmanager.php
+++ b/lib/private/tempmanager.php
@@ -42,7 +42,10 @@ class TempManager implements ITempManager {
}
protected function generatePath($postFix) {
- return $this->tmpBaseDir . '/oc_tmp_' . md5(time() . rand()) . '.' . $postFix;
+ if ($postFix) {
+ $postFix = '.' . ltrim($postFix, '.');
+ }
+ return $this->tmpBaseDir . '/oc_tmp_' . md5(time() . rand()) . $postFix;
}
/**