[Pkg-owncloud-commits] [owncloud] 141/394: use normalizePath to have a proper target path
David Prévot
taffit at alioth.debian.org
Fri Nov 8 23:11:48 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.
commit 34937479a83d5948280a0d31a9b7c23c20c7ab94
Author: Arthur Schiwon <blizzz at owncloud.com>
Date: Mon Nov 26 14:13:23 2012 +0100
use normalizePath to have a proper target path
---
apps/files/ajax/newfile.php | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php
index abfb354..bb55c90 100644
--- a/apps/files/ajax/newfile.php
+++ b/apps/files/ajax/newfile.php
@@ -65,9 +65,7 @@ if($source) {
$target=$dir.'/'.$filename;
$result=OC_Filesystem::file_put_contents($target, $sourceStream);
if($result) {
- if($target[0] != '/') {
- $target = '/'.$target;
- }
+ $target = OC_Filesystem::normalizePath($target);
$meta = OC_FileCache::get($target);
$mime=$meta['mimetype'];
$id = OC_FileCache::getId($target);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list