Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Samples/DesktopAppTransition/PhotoStoreDemo/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private void WindowLoaded(object sender, EventArgs e)
if (Directory.Exists(sourceDir))
{
//Obtain the path (String) to the "packaged" location, where the previous data will be migrated TO.
String destinationDir = Windows.Storage.ApplicationData.Current.LocalFolder.Path + "\\NewPhotoStore";
String destinationDir = PhotosFolder.Current;

//If you are moving data from one of the redirected folders, you need to use robocopy.exe to bypass redirection. This is the only time you should bypass redirection
//Redirected folders: https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-behind-the-scenes
Expand Down Expand Up @@ -346,4 +346,4 @@ private int RunProcess(string appName, string arguments)
return process.ExitCode;
}
}
}
}
7 changes: 5 additions & 2 deletions Samples/DesktopAppTransition/PhotoStoreDemo/PhotosFolder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ public static string Current
}
if (path==null)
{
path = new FileInfo(Assembly.GetExecutingAssembly().Location).DirectoryName;
path = Path.Combine(path, "Photos");
if(Directory.Exists(Path.Combine(Enviroment.GetFolderPath(Enviroment.SpecialFolders.LocalApplicationFolder), "PreviousPhotoStore"))
{
path = Path.Combine(Enviroment.GetFolderPath(Enviroment.SpecialFolders.LocalApplicationFolder), "PreviousPhotoStore");
}
path = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\PreviousPhotoStore"
var di = new DirectoryInfo(path);
if (!di.Exists)
{
Expand Down