mirror of
https://github.com/4sval/FModel.git
synced 2026-06-22 07:50:10 -05:00
paks are now ignored if they are fully locked (trying to use fmodel while updating the game)
This commit is contained in:
parent
a6b4b47f82
commit
97df9f0c65
|
|
@ -116,22 +116,8 @@ namespace FModel
|
|||
for (int i = 0; i < yourPaKs.Count(); i++)
|
||||
{
|
||||
string arCurrentUsedPak = yourPaKs.ElementAt(i); //SET CURRENT PAK
|
||||
string arCurrentUsedPakGuid = ThePak.ReadPakGuid(Settings.Default.PAKsPath + "\\" + Path.GetFileName(arCurrentUsedPak)); //SET CURRENT PAK GUID
|
||||
|
||||
if (arCurrentUsedPakGuid == "0-0-0-0")
|
||||
{
|
||||
ThePak.mainPaksList.Add(new PaksEntry(Path.GetFileName(arCurrentUsedPak), arCurrentUsedPakGuid));
|
||||
AddPaKs(Path.GetFileName(arCurrentUsedPak)); //add to toolstrip
|
||||
}
|
||||
if (arCurrentUsedPakGuid != "0-0-0-0")
|
||||
{
|
||||
ThePak.dynamicPaksList.Add(new PaksEntry(Path.GetFileName(arCurrentUsedPak), arCurrentUsedPakGuid));
|
||||
AddPaKs(Path.GetFileName(arCurrentUsedPak)); //add to toolstrip
|
||||
}
|
||||
|
||||
//IT'S TRIGGERED WHEN FORTNITE IS RUNNING BUT FILES CAN BE READ AND I WANT IT TO BE TRIGGERED WHEN FILE IS FULLY LOCKED AND CAN'T BE USED AT ALL
|
||||
//aka while you're updating the game
|
||||
/*if (!Utilities.IsFileLocked(new System.IO.FileInfo(arCurrentUsedPak)))
|
||||
if (!Utilities.IsFileLocked(new System.IO.FileInfo(arCurrentUsedPak)))
|
||||
{
|
||||
string arCurrentUsedPakGuid = ThePak.ReadPakGuid(Settings.Default.PAKsPath + "\\" + Path.GetFileName(arCurrentUsedPak)); //SET CURRENT PAK GUID
|
||||
|
||||
|
|
@ -146,7 +132,7 @@ namespace FModel
|
|||
AddPaKs(Path.GetFileName(arCurrentUsedPak)); //add to toolstrip
|
||||
}
|
||||
}
|
||||
else { AppendText(Path.GetFileName(arCurrentUsedPak) + " is locked by another process.", Color.Red, true); }*/
|
||||
else { AppendText(Path.GetFileName(arCurrentUsedPak) + " is locked by another process.", Color.Red, true); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ namespace FModel
|
|||
FileStream stream = null;
|
||||
try
|
||||
{
|
||||
stream = file.Open(FileMode.Open, FileAccess.Read, FileShare.None);
|
||||
stream = file.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user