Compare commits
3 Commits
d6a62dc315
...
7cdf77cbb9
Author | SHA1 | Date | |
---|---|---|---|
7cdf77cbb9 | |||
5a9aed4969 | |||
5b41f687d0 |
@ -114,17 +114,12 @@ public abstract class Connector
|
||||
{
|
||||
Regex legalCharacters = new Regex(@"([A-z]*[0-9]* *\.*-*,*\]*\[*'*\'*\)*\(*~*!*)*");
|
||||
string oldFilePath = Path.Join(downloadLocation, publication.folderName, $"{string.Concat(legalCharacters.Matches(chapter.name ?? ""))} - V{chapter.volumeNumber}C{chapter.chapterNumber} - {chapter.sortNumber}.cbz");
|
||||
string oldFilePath2 = Path.Join(downloadLocation, publication.folderName, $"{string.Concat(legalCharacters.Matches(chapter.name ?? ""))} - VC{chapter.chapterNumber} - {chapter.sortNumber}.cbz");
|
||||
string oldFilePath2 = Path.Join(downloadLocation, publication.folderName, $"{string.Concat(legalCharacters.Matches(chapter.name ?? ""))} - VC{chapter.chapterNumber} - {chapter.chapterNumber}.cbz");
|
||||
string newFilePath = GetArchiveFilePath(publication, chapter);
|
||||
if (File.Exists(oldFilePath))
|
||||
{
|
||||
logger?.WriteLine(this.GetType().ToString(), $"Moving old file {oldFilePath} -> {newFilePath}");
|
||||
File.Move(oldFilePath, newFilePath);
|
||||
}else if (File.Exists(oldFilePath2))
|
||||
{
|
||||
logger?.WriteLine(this.GetType().ToString(), $"Moving old file {oldFilePath2} -> {newFilePath}");
|
||||
else if (File.Exists(oldFilePath2))
|
||||
File.Move(oldFilePath2, newFilePath);
|
||||
}
|
||||
return File.Exists(newFilePath);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user