RJVB / afsctool

This is a version of "brkirch"'s afsctool utility that allows end-users to leverage HFS+ compression.
https://brkirch.wordpress.com/afsctool
GNU General Public License v3.0
187 stars 18 forks source link

Problem with filename/path containing punctuation #26

Open gingerbeardman opened 5 years ago

gingerbeardman commented 5 years ago

I was compressing some odd files, and there was this error:

/Users/matt/Downloads/1234_Years/2018/2018-06/2018-06-16/PSX ISOs/_Table Games/Hanafuda/BIN/Nice Price Series Vol. 03 - Hanafuda : No such file or directory

It was a file, and it is there, so I am thinking that perhaps some punctuation is the problem?

RJVB commented 5 years ago

I did this:

> mkdir -p "/tmp/1234_Years/2018/2018-06/2018-06-16/PSX ISOs/_Table Games/Hanafuda/BIN"
> ll /opt/local/bin > "/tmp/1234_Years/2018/2018-06/2018-06-16/PSX ISOs/_Table Games/Hanafuda/BIN/Nice Price Series Vol. 03 - Hanafuda"
> afsctool -cfvvv -8 "/tmp/1234_Years/2018/2018-06/2018-06-16/PSX ISOs/_Table Games/Hanafuda/BIN/Nice Price Series Vol. 03 - Hanafuda"
/tmp/1234_Years/2018/2018-06/2018-06-16/PSX ISOs/_Table Games/Hanafuda/BIN/Nice Price Series Vol. 03 - Hanafuda:
Compression type: ZLIB in resource fork (4)
File content type: dyn.age8u
File resource fork size: 66064 bytes
File DECMPFS attribute size: 16 bytes
File size (uncompressed; reported size by Mac OS 10.6+ Finder): 347935 bytes / 348 KB (kilobytes, base-10)
File size (compressed): 69632 bytes / 68 KiB
Compression savings: 80.0%
Number of extended attributes: 0
Total size of extended attribute data: 0 bytes
Approximate overhead of extended attributes: 536 bytes
Uncompressed file size reported in compressed header: 347935 bytes

The filename is far from the maximum length so that can't be it. What's the size of the file, and what's in it?

gingerbeardman commented 5 years ago

It's a the data track of a PlayStation 1 game (not so useful alone, so here it is, password is afsctool): https://workupload.com/file/cUWB67ZU

59,858,400 bytes

RJVB commented 5 years ago

OK, I'll have a look when I get back to my Mac. Meanwhile, what other details can you give that might be different on my end, beyond the OS version? Did you give the filename to afsctool, or the enclosing directory?

If my code really had a problem with the punctuation (as shown in your message above) I should have been able to reproduce the issue, UNLESS we're dealing with a filesystem (or libc) problem that doesn't exist on my system.

What happens when you run a standard utility like wc on the file?

gingerbeardman commented 5 years ago

I use APFS on 10.13.6 and call apfstool with bash for loop for selected files.

I'll try some more debug later

RJVB commented 5 years ago
> afsctool -cfvvv -8 "/tmp/1234_Years/2018/2018-06/2018-06-16/PSX ISOs/_Table Games/Hanafuda/BIN/Nice Price Series Vol. 03 - Hanafuda & Card Game (Japan).bin" 
/tmp/1234_Years/2018/2018-06/2018-06-16/PSX ISOs/_Table Games/Hanafuda/BIN/Nice Price Series Vol. 03 - Hanafuda & Card Game (Japan).bin:
Compression type: ZLIB in resource fork (4)
File content type: com.apple.macbinary-archive
File resource fork size: 4170322 bytes
File DECMPFS attribute size: 16 bytes
File size (uncompressed; reported size by Mac OS 10.6+ Finder): 59858400 bytes / 59.9 MB (megabytes, base-10)
File size (compressed): 4173824 bytes / 4 MiB
Compression savings: 93.0%
Number of extended attributes: 0
Total size of extended attribute data: 0 bytes
Approximate overhead of extended attributes: 536 bytes
Uncompressed file size reported in compressed header: 59858400 bytes
gingerbeardman commented 5 years ago

I'm using different arguments, which I'll post when I can get back my Mac