Skip to content

Commit

Permalink
Client|Resources: Moved internal legacy savegames folder
Browse files Browse the repository at this point in the history
Added the /sys folder for files that are used for internal processing
that the user doesn't (and shouldn't) need to know about.
  • Loading branch information
skyjake committed Jan 12, 2016
1 parent 86c5bf2 commit d239877
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doomsday/apps/client/src/resource/resourcesystem.cpp
Expand Up @@ -589,7 +589,7 @@ DENG2_PIMPL(ResourceSystem)
App::fileSystem().makeFolder("/home/savegames");

// Create the legacy savegame folder.
App::fileSystem().makeFolder("/legacysavegames");
App::fileSystem().makeFolder("/sys/legacysavegames");

App::packageLoader().loadFromCommandLine();
}
Expand Down Expand Up @@ -2223,7 +2223,7 @@ DENG2_PIMPL(ResourceSystem)
void locateLegacySavegames(String const &gameId)
{
LOG_AS("ResourceSystem");
String const legacySavePath = String("/legacysavegames") / gameId;
String const legacySavePath = String("/sys/legacysavegames") / gameId;
if(Folder *oldSaveFolder = App::rootFolder().tryLocate<Folder>(legacySavePath))
{
// Add any new legacy savegames which may have appeared in this folder.
Expand All @@ -2233,7 +2233,7 @@ DENG2_PIMPL(ResourceSystem)
{
try
{
// Make and setup a feed for the /legacysavegames/<gameId> subfolder if the game
// Make and setup a feed for the /sys/legacysavegames/<gameId> subfolder if the game
// might have legacy savegames we may need to convert later.
NativePath const oldSavePath = App_Games().byIdentityKey(gameId).legacySavegamePath();
if(oldSavePath.exists() && oldSavePath.isReadable())
Expand Down Expand Up @@ -3820,14 +3820,14 @@ bool ResourceSystem::convertLegacySavegames(String const &gameId, String const &
// A converter plugin is required.
if(!Plug_CheckForHook(HOOK_SAVEGAME_CONVERT)) return false;

// Populate /legacysavegames/<gameId> with new savegames which may have appeared.
// Populate /sys/legacysavegames/<gameId> with new savegames which may have appeared.
d->locateLegacySavegames(gameId);

bool didSchedule = false;
if(sourcePath.isEmpty())
{
// Process all legacy savegames.
if(Folder const *saveFolder = App::rootFolder().tryLocate<Folder>(String("legacysavegames") / gameId))
if(Folder const *saveFolder = App::rootFolder().tryLocate<Folder>(String("sys/legacysavegames") / gameId))
{
/// @todo File name pattern matching should not be done here. This is to prevent
/// attempting to convert Hexen's map state side car files separately when this
Expand Down

0 comments on commit d239877

Please sign in to comment.