diff --git a/fdbclient/BackupContainer.actor.cpp b/fdbclient/BackupContainer.actor.cpp index b6e455bc3c8..b11c9b3ef39 100644 --- a/fdbclient/BackupContainer.actor.cpp +++ b/fdbclient/BackupContainer.actor.cpp @@ -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 /backup-