FileManager: FILE_GENERATE_LOCATION_INVALID

GitOrigin-RevId: bc66c7e63376a3aca0bdcaf1d7f8cbb57e32eb53
This commit is contained in:
Arseny Smirnov 2018-11-06 19:02:19 +03:00
parent 2c6bd673c7
commit a80e0621e4
2 changed files with 5 additions and 1 deletions

View File

@ -367,7 +367,7 @@ static Status check_mtime(std::string &conversion, CSlice original_path) {
if (expected_mtime == actual_mtime) {
return Status::OK();
}
return Status::Error(PSLICE() << "File \"" << original_path
return Status::Error(PSLICE() << "FILE_GENERATE_LOCATION_INVALID: File \"" << original_path
<< "\" was modified: " << tag("expected modification time", expected_mtime)
<< tag("actual modification time", actual_mtime));
}

View File

@ -2465,6 +2465,10 @@ void FileManager::on_error_impl(FileNodePtr node, FileManager::Query::Type type,
}
}
if (begins_with(status.message(), "FILE_GENERATE_LOCATION_INVALID")) {
node->set_generate_location(nullptr);
}
if (status.message() == "FILE_UPLOAD_RESTART") {
run_upload(node, {});
return;