diff --git a/greyhole b/greyhole index 584315b7..387658a9 100755 --- a/greyhole +++ b/greyhole @@ -1473,7 +1473,7 @@ function create_copies_from_tombstones($tombstones, $share, $full_path, $source_ $tombstone->state = 'OK'; $tombstones[$key] = $tombstone; } - save_tombstones($share, $path, $filename, array_values($tombstones), get_storage_volume_from_path($tombstone->path)); + save_tombstones($share, $path, $filename, array_values($tombstones)); } } @@ -1698,19 +1698,16 @@ function remove_tombstones($share, $path, $filename) { } } -function save_tombstones($share, $path, $filename, $tombstones, $only_target_drive=NULL) { +function save_tombstones($share, $path, $filename, $tombstones) { if (count($tombstones) == 0) { remove_tombstones($share, $path, $filename); return; } - gh_log(DEBUG, " Saving " . (empty($only_target_drive) ? count($tombstones) : 1) . " tombstones for $share" . (!empty($path) ? "/$path" : "") . ($filename!== null ? "/$filename" : "")); + gh_log(DEBUG, " Saving " . count($tombstones) . " tombstones for $share" . (!empty($path) ? "/$path" : "") . ($filename!== null ? "/$filename" : "")); $paths_used = array(); foreach (get_graveyards() as $graveyard) { $target_drive = str_replace('/.gh_graveyard', '', $graveyard); - if (!empty($only_target_drive) && $only_target_drive != $target_drive) { - continue; - } $data_filepath = "$graveyard/$share/$path"; $has_tombstone = FALSE; foreach ($tombstones as $tombstone) { @@ -1730,7 +1727,7 @@ function save_tombstones($share, $path, $filename, $tombstones, $only_target_dri unlink("$data_filepath/$filename"); } } - if (count($paths_used) == 1 && empty($only_target_drive)) { + if (count($paths_used) == 1) { // Also save a backup on another drive global $graveyard_backup_directories; if (count($graveyard_backup_directories) > 0) {