[Pkg-owncloud-commits] [owncloud] 145/394: make sure path starts with /

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:11:49 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 07c0cda12d8ed739649fb7d760c10697be5c717f
Author: Arthur Schiwon <blizzz at owncloud.com>
Date:   Thu Nov 15 18:25:31 2012 +0100

    make sure path starts with /
---
 apps/files/ajax/newfile.php |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php
index 77d8669..abfb354 100644
--- a/apps/files/ajax/newfile.php
+++ b/apps/files/ajax/newfile.php
@@ -65,6 +65,9 @@ if($source) {
 	$target=$dir.'/'.$filename;
 	$result=OC_Filesystem::file_put_contents($target, $sourceStream);
 	if($result) {
+		if($target[0] != '/') {
+			$target = '/'.$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