mirror of
https://github.com/FroggMaster/CreamInstaller.git
synced 2026-06-12 19:11:25 -07:00
yes
This commit is contained in:
@@ -64,17 +64,10 @@ namespace CreamInstaller
|
||||
|
||||
public static bool IsFilePathLocked(this string filePath)
|
||||
{
|
||||
if (!File.Exists(filePath)) return false;
|
||||
bool Locked = false;
|
||||
try
|
||||
{
|
||||
File.Open(filePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None).Close();
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
Locked = true;
|
||||
}
|
||||
return Locked;
|
||||
try { File.Open(filePath, FileMode.Open, FileAccess.ReadWrite, FileShare.None).Close(); }
|
||||
catch (FileNotFoundException) { return false; }
|
||||
catch (IOException) { return true; }
|
||||
return false;
|
||||
}
|
||||
|
||||
public static SelectForm SelectForm;
|
||||
|
||||
Reference in New Issue
Block a user