mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-03 02:36:50 +13:00
Merge branch 'master' of github.com:ShareX/ShareX
This commit is contained in:
commit
de618fd383
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue