vpk icon indicating copy to clipboard operation
vpk copied to clipboard

Wrong determination of multi-chunk file name.

Open tteko opened this issue 2 years ago • 4 comments

I tried to unpack two files i have: sde_pack_lang_english_dir.vpk and sde_pack_lang_english_000.vpk by command:

vpk -x . sde_pack_lang_english_dir.vpk

IOError: [Errno 2] No such file or directory: 'sde_pack_lang__000.vpk'

I guess what is about the third underscore character in VPK file name?

tteko avatar Mar 02 '23 08:03 tteko

Addition. I tried to rename the files differently and found out that there is 'a forbidden' word in the file name, namely 'english'. For some reason this word disappears when opening a chunk file!

tteko avatar Mar 02 '23 10:03 tteko

Wow it literally looks for the word "english" and replaces it with something else!

https://github.com/ValvePython/vpk/blob/3ff641e5fa7cf53a12c886153db0aab7a7872821/vpk/init.py#L332

I feel like this was done to make it work for vpk names in a specific game, so the tool may still not be fully reliable with this line removed

NvC-DmN-CH avatar May 24 '24 08:05 NvC-DmN-CH

The replacement should be removed or at least an option should be made to ignore it. Getting same error when trying to extract tf2_sound_vo_english_dir.vpk.

Tiagoquix avatar Sep 12 '24 18:09 Tiagoquix

friendly ping @rossengeorgiev

Tiagoquix avatar May 26 '25 05:05 Tiagoquix