Skip to content

Commit

Permalink
Don't always change path to relative during export
Browse files Browse the repository at this point in the history
  • Loading branch information
DSPaul committed Mar 5, 2024
1 parent 9bac479 commit 9d74d5c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ViewModels/ExportCollectionViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,15 @@ public async Task ExportToFile()
{
int indexStartFilename = relativePath.Length - Path.GetFileName(codex.Path)!.Length;
zip.AddFile(codex.Path, Path.Combine("Files", relativePath[0..indexStartFilename]));
//keep the relative path, will be used during import to link the included files
codex.Path = relativePath;
}

//absolute path is user specific, so counts as personal data
if (ContentSelectorVM.RemovePersonalData)
{
codex.Path = relativePath;
}
//strip longest common path so relative paths stay, given that full paths will break anyway
codex.Path = relativePath;
}

ContentSelectorVM.CuratedCollection.SaveCodices();
Expand Down

0 comments on commit 9d74d5c

Please sign in to comment.