summaryrefslogtreecommitdiffstats
path: root/lib/private/tempmanager.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-03-26 23:08:08 +0100
committerVincent Petry <pvince81@owncloud.com>2015-03-26 23:08:08 +0100
commit746be98e0387ea138c4413fb89ad7e9ee87ce7aa (patch)
tree96decc89487fed61b0a111e4d630cf668c615c99 /lib/private/tempmanager.php
parentd082e37270f19269cd13098cb013c8543f4a1843 (diff)
parentf890c3ffb1b7f7f1b744b37426993010e0c39138 (diff)
downloadnextcloud-server-746be98e0387ea138c4413fb89ad7e9ee87ce7aa.tar.gz
nextcloud-server-746be98e0387ea138c4413fb89ad7e9ee87ce7aa.zip
Merge pull request #13654 from oparoz/tmpfile-with-extension
Keep the extension in temp files
Diffstat (limited to 'lib/private/tempmanager.php')
-rw-r--r--lib/private/tempmanager.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/tempmanager.php b/lib/private/tempmanager.php
index 33c3f1e9aef..197c0233142 100644
--- a/lib/private/tempmanager.php
+++ b/lib/private/tempmanager.php
@@ -55,6 +55,9 @@ class TempManager implements ITempManager {
}
protected function generatePath($postFix) {
+ if ($postFix) {
+ $postFix = '.' . ltrim($postFix, '.');
+ }
return $this->tmpBaseDir . '/oc_tmp_' . md5(time() . rand()) . $postFix;
}