From 1f42e81c540002602c9c342e9442658f8250d8e2 Mon Sep 17 00:00:00 2001 From: danij Date: Thu, 20 Mar 2014 22:57:21 +0000 Subject: [PATCH] Resource System: Sleep for a short while after initiating a savegame conversion To give the converter a chance to finish the job before attempting to repopulate the /savegame folder. Note that this does not block the main/UI thread. Todo for later: Use a background Task for conversion. --- doomsday/client/src/resource/resourcesystem.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doomsday/client/src/resource/resourcesystem.cpp b/doomsday/client/src/resource/resourcesystem.cpp index 82c4f670d5..4664175f42 100644 --- a/doomsday/client/src/resource/resourcesystem.cpp +++ b/doomsday/client/src/resource/resourcesystem.cpp @@ -1958,8 +1958,11 @@ DENG2_PIMPL(ResourceSystem) if(success) { - /// Update the /savegame folder. @todo necessary? - Folder &outputFolder = App::rootFolder().locate("/savegame"); + /// @todo kludge: Give the converter a chance to complete. + TimeDelta::fromMilliSeconds(1000).sleep(); + + /// Update the /savegame folder. + Folder &outputFolder = App::rootFolder().locate(String("/savegame") / gameId); outputFolder.populate(Folder::PopulateOnlyThisFolder); addSavedSession(repoPath);