[Pkg-owncloud-commits] [owncloud] 47/69: Fix endless loop on windows servers
David Prévot
taffit at moszumanska.debian.org
Sat May 10 16:20:38 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit dbb93074b30e5edb95db75b0db79b14dc7ad3428
Author: Joas Schilling <nickvergessen at gmx.de>
Date: Wed May 7 17:37:49 2014 +0200
Fix endless loop on windows servers
Directory seperator is \ on windows
However we can just check for path != dirname(path) because that is
the same for '' (empty string), '.' and DIRECTORY_SEPARATOR on all OS
---
apps/files_sharing/lib/helper.php | 2 +-
apps/files_sharing/lib/updater.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/files_sharing/lib/helper.php b/apps/files_sharing/lib/helper.php
index c734753..7a5b859 100644
--- a/apps/files_sharing/lib/helper.php
+++ b/apps/files_sharing/lib/helper.php
@@ -125,7 +125,7 @@ class Helper {
$ids = array();
- while ($path !== '' && $path !== '.' && $path !== '/') {
+ while ($path !== dirname($path)) {
$info = $ownerView->getFileInfo($path);
if ($info instanceof \OC\Files\FileInfo) {
$ids[] = $info['fileid'];
diff --git a/apps/files_sharing/lib/updater.php b/apps/files_sharing/lib/updater.php
index 249211c..43f5f14 100644
--- a/apps/files_sharing/lib/updater.php
+++ b/apps/files_sharing/lib/updater.php
@@ -38,7 +38,7 @@ class Shared_Updater {
\OC\Files\Filesystem::initMountPoints($user);
$view = new \OC\Files\View('/' . $user);
if ($view->file_exists($path)) {
- while ($path !== '/') {
+ while ($path !== dirname($path)) {
$etag = $view->getETag($path);
$view->putFileInfo($path, array('etag' => $etag));
$path = dirname($path);
--
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