Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions fdbclient/BackupContainer.actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1545,9 +1545,13 @@ class BackupContainerLocalDirectory : public BackupContainerFileSystem, Referenc
// Remove trailing slashes on path
path.erase(path.find_last_not_of("\\/") + 1);

if(!g_network->isSimulated() && path != abspath(path)) {
TraceEvent(SevWarn, "BackupContainerLocalDirectory").detail("Description", "Backup path must be absolute (e.g. file:///some/path)").detail("URL", url).detail("Path", path);
throw io_error();
std::string absolutePath = abspath(path);

if(!g_network->isSimulated() && path != absolutePath) {
TraceEvent(SevWarn, "BackupContainerLocalDirectory").detail("Description", "Backup path must be absolute (e.g. file:///some/path)").detail("URL", url).detail("Path", path).detail("AbsolutePath", absolutePath);
// throw io_error();
IBackupContainer::lastOpenError = format("Backup path '%s' must be the absolute path '%s'", path.c_str(), absolutePath.c_str());
throw backup_invalid_url();
}

// Finalized path written to will be will be <path>/backup-<uid>
Expand Down