MassManager: fix a bug with importing.

This commit is contained in:
Guillaume Jacquemin 2021-10-13 14:49:31 +02:00
parent 05a2b1cfb0
commit dd460b4313

View file

@ -90,7 +90,7 @@ auto MassManager::importMass(const std::string& staged_fn, int hangar) -> bool {
Utility::Directory::rm(_hangars[hangar].filename()); Utility::Directory::rm(_hangars[hangar].filename());
} }
if(!Utility::Directory::move(source + ".tmp", _hangars[hangar].filename())) { if(!Utility::Directory::move(source + ".tmp", Utility::Directory::join(_saveDirectory, _hangars[hangar].filename()))) {
_lastError = Utility::formatString("Couldn't move {} to hangar {:.2d}", staged_fn, hangar + 1); _lastError = Utility::formatString("Couldn't move {} to hangar {:.2d}", staged_fn, hangar + 1);
return false; return false;
} }