Browse Source

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
remotes/origin/ldap_group_count
Joas Schilling 12 years ago
parent
commit
dbb93074b3
  1. 2
      apps/files_sharing/lib/helper.php
  2. 2
      apps/files_sharing/lib/updater.php

2
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'];

2
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);

Loading…
Cancel
Save