[Pkg-owncloud-commits] [owncloud] 48/49: Fix file not found issue in documents app
David Prévot
taffit at moszumanska.debian.org
Thu Dec 5 16:02:58 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 7b34d59ff632cbcbb9e50314631f91474e6d51b2
Author: David Prévot <taffit at debian.org>
Date: Thu Dec 5 11:14:22 2013 -0400
Fix file not found issue in documents app
Git-Dch: Ignore
---
.../patches/0017-Fixed-file-not-found-issue.patch | 43 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 44 insertions(+)
diff --git a/debian/patches/0017-Fixed-file-not-found-issue.patch b/debian/patches/0017-Fixed-file-not-found-issue.patch
new file mode 100644
index 0000000..3b3c8d2
--- /dev/null
+++ b/debian/patches/0017-Fixed-file-not-found-issue.patch
@@ -0,0 +1,43 @@
+From: Vincent Petry <PVince81 at yahoo.fr>
+Date: Thu, 5 Dec 2013 12:18:06 +0100
+Subject: Fixed file not found issue
+
+This fixes an issue where the second call would miss the "/files" part.
+
+The path attribute must keep "files" so that the next call to the File
+instance will still have the correct one.
+
+Fixes #155
+
+Bugs: https://github.com/owncloud/documents/issues/155
+Origin: upstream, https://github.com/owncloud/documents/commit/aed7ed77d276fcf7e028ff9ae0930a1ba8f1a131
+---
+ apps/documents/lib/file.php | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/apps/documents/lib/file.php b/apps/documents/lib/file.php
+index 265e6c7..84125bd 100644
+--- a/apps/documents/lib/file.php
++++ b/apps/documents/lib/file.php
+@@ -177,17 +177,18 @@ class File {
+ /* to emit hooks properly, view root should contain /user/files */
+
+ if (strpos($this->path, 'files') === 0){
+- $this->path = preg_replace('|^files|', '', $this->path);
++ $path = preg_replace('|^files|', '', $this->path);
+ $view = new View('/' . $this->owner . '/files');
+ } else {
++ $path = $this->path;
+ $view = new View('/' . $this->owner);
+ }
+
+- if (!$view->file_exists($this->path)){
++ if (!$view->file_exists($path)){
+ throw new \Exception($this->path . ' doesn\'t exist');
+ }
+
+- return array($view, $this->path);
++ return array($view, $path);
+ }
+
+ public function getOwner(){
diff --git a/debian/patches/series b/debian/patches/series
index 04b28e8..66ff053 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -14,3 +14,4 @@ path/0013-Adapt-google-api-php-client-path.patch
path/0014-Adapt-Dropbox-path.patch
path/0015-Adapt-php-opencloud-path.patch
path/0016-Adapt-Zend-path.patch
+0017-Fixed-file-not-found-issue.patch
--
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