mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Change method name to make intention clearer. Add additional methods
This commit is contained in:
parent
dbc52f56c8
commit
39eac96023
1 changed files with 12 additions and 2 deletions
|
|
@ -48,7 +48,7 @@ namespace Wox.Plugin.SharedCommands
|
|||
throw e;
|
||||
#else
|
||||
MessageBox.Show(string.Format("Copying path {0} has failed, it will now be deleted for consistency", targetPath));
|
||||
RemoveFolder(targetPath);
|
||||
RemoveFolderIfExists(targetPath);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ namespace Wox.Plugin.SharedCommands
|
|||
|
||||
}
|
||||
|
||||
public static void RemoveFolder(this string path)
|
||||
public static void RemoveFolderIfExists(this string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -97,5 +97,15 @@ namespace Wox.Plugin.SharedCommands
|
|||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
public static bool LocationExists(this string path)
|
||||
{
|
||||
return Directory.Exists(path);
|
||||
}
|
||||
|
||||
public static bool FileExits(this string filePath)
|
||||
{
|
||||
return File.Exists(filePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue