Skip to content

Commit 5048015

Browse files
committed
Add detection of Windows 10 pc
1 parent 0407d0f commit 5048015

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

SaveWin10Pictures/Program.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,18 @@ private static void Main()
1414
List<string> files = new List<string>();
1515
int counter = 0;
1616
const string userName = "user";
17-
string imagePath = $@"C:\Users\{userName}\Pictures\fond_ecran";
17+
string imagePath = $@"C:\Users\{userName}\Pictures";
18+
if (Directory.Exists($@"C:\Users\{userName}\Pictures\fond_ecran"))
19+
{
20+
imagePath = $@"C:\Users\{userName}\Pictures\fond_ecran";
21+
}
22+
23+
if (!Directory.Exists($@"C:\Users\{userName}\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets"))
24+
{
25+
display($@"The directory C:\Users\{userName}\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets does not appear to exit, are you on a Windows 10 PC ?");
26+
return;
27+
}
28+
1829
foreach (string file in GetFilesFileteredBySize(new DirectoryInfo($@"C:\Users\{userName}\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets"), 100000))
1930
{
2031
files.Add(file);

0 commit comments

Comments
 (0)