Now we can rename folders in file provider.

This commit is contained in:
larsbrubaker 2015-07-28 12:12:42 -07:00
parent 2e706a084f
commit 0aa0f7e97f
5 changed files with 40 additions and 16 deletions

View file

@ -191,7 +191,7 @@ namespace MatterHackers.MatterControl.PrintLibrary.Provider
string sourceDir = Path.Combine(rootPath, currentDirectoryDirectories[collectionIndexToRename]);
if (Directory.Exists(sourceDir))
{
string destDir = Path.Combine(Path.GetDirectoryName(sourceDir), sourceDir);
string destDir = Path.Combine(Path.GetDirectoryName(sourceDir), newName);
Directory.Move(sourceDir, destDir);
Stopwatch time = Stopwatch.StartNew();
// Wait for up to some amount of time for the directory to be gone.