Skip to content

Commit

Permalink
More explicit error message when no file copies are found
Browse files Browse the repository at this point in the history
  • Loading branch information
gboudreau committed Feb 18, 2017
1 parent 1b533d9 commit 9b4b544
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion greyhole
Original file line number Diff line number Diff line change
Expand Up @@ -2589,7 +2589,7 @@ function gh_fsck_file($path, $filename, $file_type, $source, $share, $storage_pa
save_metafiles($share, $file_path, $filename, $file_metafiles);
}
} else if (count($file_copies_inodes) == 0 && !isset($original_file_path)) {
Log::warn(' WARNING! No copies of this file are available in the Greyhole storage pool. ' . (is_link("$landing_zone/$file_path/$filename") ? 'Deleting from share.' : (gh_is_file("$landing_zone/$file_path/$filename") ? 'Did you copy that file there without using your Samba shares? (If you did, don\'t do that in the future.)' : '')), Log::EVENT_CODE_FSCK_NO_FILE_COPIES);
Log::warn(' WARNING! No copies of this file are available in the Greyhole storage pool: "' . clean_dir("$share/$file_path/$filename") . '". ' . (is_link("$landing_zone/$file_path/$filename") ? 'Deleting from share.' : (gh_is_file("$landing_zone/$file_path/$filename") ? 'Did you copy that file there without using your Samba shares? (If you did, don\'t do that in the future.)' : '')), Log::EVENT_CODE_FSCK_NO_FILE_COPIES);
if ($source == 'metastore' || get_metafile_data_filename($share, $file_path, $filename) !== FALSE) {
$fsck_report['no_copies_found_files'][clean_dir("$share/$file_path/$filename")] = TRUE;
}
Expand Down

0 comments on commit 9b4b544

Please sign in to comment.