Refactor valid path/filename. Centralize validaion. Universal templating is one step closer

This commit is contained in:
Robert McRackan 2021-10-18 13:36:55 -04:00
parent 7720110460
commit d08962cffa
18 changed files with 415 additions and 74 deletions

View file

@ -198,7 +198,7 @@ namespace FileLiberator
{
var entry = entries[i];
var realDest = FileUtility.Move(entry.Path, Path.Combine(destinationDir, Path.GetFileName(entry.Path)));
var realDest = FileUtility.SaferMoveToValidPath(entry.Path, Path.Combine(destinationDir, Path.GetFileName(entry.Path)));
FilePathCache.Insert(book.AudibleProductId, realDest);
// propogate corrected path. Must update cache with corrected path. Also want updated path for cue file (after this for-loop)