View Issue Details

IDProjectCategoryView StatusLast Update
0004824The Dark ModCodingpublic08.06.2018 17:39
Reporterstgatilov Assigned Tostgatilov  
Status resolvedResolutionfixed 
Product VersionTDM 2.06 
Target VersionTDM 2.07Fixed in VersionTDM 2.07 
Summary0004824: Make pk4 repacking more resistant to antiviruses
DescriptionThis is a small attempt to avoid a rather hypothetical issue with antiviruses.

Right now when xyz.pk4 is repacked, we do it like this:
1. Create xyz.pk4.tmp --- the new version of file.
2. Delete the old xyz.pk4.
3. Rename xyz.pk4.tmp to xyz.pk4.

In case someone scans newly created files, there is a chance that during step 3 TDM will try to delete xyz.pk4.tmp, which is being scanned by someone. Moreover, if it happens, then currently TDM will print error and abort loading, leaving player with only xyz.pk4.tmp on his filesystem.

I'd want to change the scheme to:
1. Create xyz.pk4.tmp --- the new version of file.
2. Copy xyz.pk4.tmp to xyz.pk4.
3. Remove xyz.pk4.tmp (ignoring errors).

If step 3 ends with error, user will have excessive tmp files, which he can always remove manually or just leave lying around.
Among steps 1 and 2, only xyz.pk4 is modified. If such modification fails, player will still have the original pk4 file on its place (the tmp file can be ignored).
TagsNo tags attached.


related to 0004504 resolvedstgatilov Performance of reading OGG from PK4 




08.06.2018 17:39

administrator   ~0010508

Done in svn rev 7439 and 7440.

Issue History

Date Modified Username Field Change
05.06.2018 16:56 stgatilov New Issue
05.06.2018 16:57 stgatilov Relationship added related to 0004504
05.06.2018 16:57 stgatilov Assigned To => stgatilov
05.06.2018 16:57 stgatilov Status new => assigned
08.06.2018 17:39 stgatilov Note Added: 0010508
08.06.2018 17:39 stgatilov Status assigned => resolved
08.06.2018 17:39 stgatilov Fixed in Version => TDM 2.07
08.06.2018 17:39 stgatilov Resolution open => fixed