Added code to prevent desktop.ini from being archived.

This commit is contained in:
2020-02-17 12:32:18 +01:00
parent 67889a9ac8
commit 45d3af071e

View File

@@ -41,13 +41,19 @@ namespace OneDriveArchiver
Console.WriteLine($"{appName}: Processing file {item}..."); Console.WriteLine($"{appName}: Processing file {item}...");
// skip ourselves... // skip ourselves...
if (item.Contains("OneDriveArchiver")) if (item.ToLower().Contains("onedrivearchiver"))
{ {
Console.WriteLine( Console.WriteLine(
$"{appName}: Skipping processing of my own executable. Proceeding..."); $"{appName}: Skipping processing of my own executable. Proceeding...");
continue; continue;
} }
// we do not archive desktop.ini either...
if (item.ToLower().Contains("desktop.ini"))
{
Console.WriteLine($"{appName}: skipping desktop.ini file...");
}
// archive the file // archive the file
IoHelper.ArchiveOneDriveFile(appName, item); IoHelper.ArchiveOneDriveFile(appName, item);