summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/helper.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-05-07 17:37:49 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-05-07 17:38:29 +0200
commitdbb93074b30e5edb95db75b0db79b14dc7ad3428 (patch)
treeb66c4415332e2f5ff919004d4d810ea7909b2033 /apps/files_sharing/lib/helper.php
parent31bf2d4b33ea28cb8db28201312ad48108136926 (diff)
downloadnextcloud-server-dbb93074b30e5edb95db75b0db79b14dc7ad3428.tar.gz
nextcloud-server-dbb93074b30e5edb95db75b0db79b14dc7ad3428.zip
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
Diffstat (limited to 'apps/files_sharing/lib/helper.php')
-rw-r--r--apps/files_sharing/lib/helper.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/helper.php b/apps/files_sharing/lib/helper.php
index c7347539fcc..7a5b859826c 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'];