Merge branch 'master' of github.com:ShareX/ShareX

This commit is contained in:
Jaex 2016-02-22 00:30:03 +02:00
commit de618fd383

View file

@ -732,10 +732,13 @@ public static bool IsFileLocked(string path)
return false;
}
public static void CreateDirectoryIfNotExist(string path, bool isFilePath = true)
public static void CreateDirectoryIfNotExist(string path, bool isFilePath = true, bool hasFileExt = true)
{
if (!string.IsNullOrEmpty(path))
{
if (hasFileExt && !Path.HasExtension(path))
isFilePath = false;
if (isFilePath)
{
path = Path.GetDirectoryName(path);