check that intro.xml/credits.xml exits before moving

This commit is contained in:
Kilian von Pflugk 2024-05-12 20:31:35 +02:00
parent 57680f25cd
commit 4be60f2e08

View File

@ -76,9 +76,19 @@ public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
// Check if the old cache directory exists
if (Directory.Exists(oldFingerprintCachePath))
{
// Move the contents from old directory to new directory
// move intro.xml if exists
if (File.Exists(oldIntroPath))
{
File.Move(oldIntroPath, _introPath);
}
// move credits.xml if exists
if (File.Exists(oldCreditsPath))
{
File.Move(oldCreditsPath, _creditsPath);
}
// Move the contents from old directory to new directory
string[] files = Directory.GetFiles(oldFingerprintCachePath);
foreach (string file in files)
{