mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
update
This commit is contained in:
parent
d55560ea97
commit
69f66b7a4b
1 changed files with 21 additions and 7 deletions
|
|
@ -42,16 +42,30 @@ namespace Wox.Plugin.SharedCommands
|
|||
|
||||
public static bool VerifyBothFolderFilesEqual(this string fromPath, string toPath)
|
||||
{
|
||||
var fromDir = new DirectoryInfo(fromPath);
|
||||
var toDir = new DirectoryInfo(toPath);
|
||||
try
|
||||
{
|
||||
var fromDir = new DirectoryInfo(fromPath);
|
||||
var toDir = new DirectoryInfo(toPath);
|
||||
|
||||
if (fromDir.GetFiles().Length != toDir.GetFiles().Length)
|
||||
return false;
|
||||
if (fromDir.GetFiles("*", SearchOption.AllDirectories).Length != toDir.GetFiles("*", SearchOption.AllDirectories).Length)
|
||||
return false;
|
||||
|
||||
if (Directory.GetDirectories(fromPath).Length != Directory.GetDirectories(toPath).Length)
|
||||
return false;
|
||||
if (fromDir.GetDirectories("*", SearchOption.AllDirectories).Length != toDir.GetDirectories("*", SearchOption.AllDirectories).Length)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
catch(PathTooLongException e)
|
||||
{
|
||||
//log and update error message to output
|
||||
#if DEBUG
|
||||
throw;
|
||||
#else
|
||||
throw;// PRODUCTION LOGGING AND CONTINUE
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void RemoveFolder(this string path)
|
||||
|
|
|
|||
Loading…
Reference in a new issue