+ hostCleanUp: check whether datafile is still existing in program-folder and delete in %U3_APP_DATA_PATH% if not
This commit is contained in:
parent
91e79130e7
commit
677d2cd6d5
27
U3Helper.ahk
27
U3Helper.ahk
@ -242,13 +242,32 @@ Else If 1 = unconfig
|
||||
FileGetAttrib FilAttr, %U3_HOST_EXEC_PATH%\%CurFile%
|
||||
IfInString FilAttr, D
|
||||
{
|
||||
Status("Saving data directory " . CurFile . " ...")
|
||||
FileCopyDir %U3_HOST_EXEC_PATH%\%CurFile%, %U3_APP_DATA_PATH%\%CurFile%, 1
|
||||
IfExist %U3_HOST_EXEC_PATH%\%CurFile%
|
||||
{
|
||||
Status("Saving data directory " . CurFile . " ...")
|
||||
FileCopyDir %U3_HOST_EXEC_PATH%\%CurFile%, %U3_APP_DATA_PATH%\%CurFile%, 1
|
||||
}
|
||||
Else
|
||||
{
|
||||
; Folder got deleted in the meantime, remove it from backup
|
||||
Status("Removing data directory " . CurFile . " ...")
|
||||
FileRemoveDir %U3_APP_DATA_PATH%\%CurFile%, 1
|
||||
}
|
||||
}
|
||||
Else
|
||||
{
|
||||
Status("Saving data file " . CurFile . " ...")
|
||||
FileCopy %U3_HOST_EXEC_PATH%\%CurFile%, %U3_APP_DATA_PATH%\%CurFile%, 1
|
||||
IfExist %U3_HOST_EXEC_PATH%\%CurFile%
|
||||
{
|
||||
Status("Saving data file " . CurFile . " ...")
|
||||
FileCopy %U3_HOST_EXEC_PATH%\%CurFile%, %U3_APP_DATA_PATH%\%CurFile%, 1
|
||||
}
|
||||
Else
|
||||
{
|
||||
; File got deleted in the meantime, remove it from backup
|
||||
Status("Removing data file " . CurFile . " ...")
|
||||
FileSetAttrib -RSH, %U3_APP_DATA_PATH%\%CurFile%
|
||||
FileDelete %U3_APP_DATA_PATH%\%CurFile%
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user