Skip to content

Commit

Permalink
also migrate titled documents
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Jan 13, 2012
1 parent fe69a9c commit 6927f15
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/cpp/session/SessionSourceDatabaseSupervisor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ FilePath persistentTitledDir()
return sourceDatabaseRoot().complete("per/t");
}

FilePath oldPersistentTitledDir()
{
FilePath oldPath = module_context::oldScopedScratchPath();
if (oldPath.exists())
return oldPath.complete("source_database_v2/persistent/titled");
else
return FilePath();
}

FilePath persistentUntitledDir()
{
Expand Down Expand Up @@ -206,6 +214,10 @@ Error createSessionDirFromPersistent(FilePath* pSessionDir)
if (persistentTitledDir().exists())
attemptToMoveSourceDbFiles(persistentTitledDir(), *pSessionDir);

// get legacy titled docs if they exist
if (oldPersistentTitledDir().exists())
attemptToMoveSourceDbFiles(oldPersistentTitledDir(), *pSessionDir);

// move persistent untitled files
if (persistentUntitledDir().exists())
attemptToMoveSourceDbFiles(persistentUntitledDir(), *pSessionDir);
Expand Down

0 comments on commit 6927f15

Please sign in to comment.