Skip to content

Commit

Permalink
Bugfix: deleting a file would sometimes make Greyhole fell in an infi…
Browse files Browse the repository at this point in the history
…nite loop of doing nothing

Noticed on CentOS only... no idea why! Anyway, the new code is more
robust, and should prevent potential problems on all OS.
  • Loading branch information
gboudreau committed Sep 16, 2011
1 parent d0c1d87 commit ed34ee1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions greyhole
Original file line number Diff line number Diff line change
Expand Up @@ -3042,10 +3042,11 @@ function gh_recycle($real_path) {
$full_path = trim($share_options['name'] . "/" . str_replace($share_options['landing_zone'], '', $real_path), '/');
$share = $share_options['name'];
} else {
$storage_volume = get_storage_volume_from_path($real_path);
foreach ($storage_pool_directories as $dir) {
if (get_storage_volume_from_path($real_path) == $dir) {
if ($dir == $storage_volume) {
$trash_path = "$dir/.gh_trash";
$full_path = trim(str_replace($dir, '', $real_path), '/');
$full_path = trim(substr($real_path, strlen($dir)), '/');
break;
}
}
Expand Down

0 comments on commit ed34ee1

Please sign in to comment.