mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 21:15:38 +02:00
disable auto restore from db/xml at pw start if system is up more than 5 min
This commit is contained in:
parent
f34fffa574
commit
8771c2edd7
1 changed files with 4 additions and 3 deletions
|
@ -1070,6 +1070,10 @@ namespace PersistentWindows.Common
|
||||||
normalSessions.Add(item);
|
normalSessions.Add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var ticks = Kernel32.GetTickCount64();
|
||||||
|
if (ticks > 600000) //system up 5min
|
||||||
|
return true;
|
||||||
|
|
||||||
if (db_exist && auto_restore_from_db)
|
if (db_exist && auto_restore_from_db)
|
||||||
{
|
{
|
||||||
restoringFromDB = true;
|
restoringFromDB = true;
|
||||||
|
@ -1082,9 +1086,6 @@ namespace PersistentWindows.Common
|
||||||
}
|
}
|
||||||
else if (db_exist && autoRestoreLiveWindowsFromDb)
|
else if (db_exist && autoRestoreLiveWindowsFromDb)
|
||||||
{
|
{
|
||||||
var ticks = Kernel32.GetTickCount64();
|
|
||||||
if (ticks > 600000) //system up 5min
|
|
||||||
return true;
|
|
||||||
Log.Event("auto restore from db");
|
Log.Event("auto restore from db");
|
||||||
restoringFromDB = true;
|
restoringFromDB = true;
|
||||||
autoInitialRestoreFromDB = true;
|
autoInitialRestoreFromDB = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue