Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use on hard-linked files? #23

Closed
wmertens opened this issue Jan 10, 2019 · 5 comments
Closed

Use on hard-linked files? #23

wmertens opened this issue Jan 10, 2019 · 5 comments

Comments

@wmertens
Copy link

(Using 1.6.9 built from the git tag)

What happens when afsctool compresses a hardlinked file? Could it be that the other links are truncated and only the processed file gets a resource fork?

The reason I ask is because I'm noticing a bunch of files with 0 bytes that I didn't process with afsctool but maybe I processed one of their hardlinks. The odd thing is that the timestamp of the files was updated, which wouldn't fit this hypothesis, timestamps are stored in the directory, not with the inode, right?

@gingerbeardman
Copy link
Contributor

I remember a 0-byte file issue with Clusters.app that I previously used for HFS+ compression.

But they never disclosed the reason. https://www.macupdate.com/app/mac/33585/clusters

@wmertens
Copy link
Author

Hmm indeed I tried using clusters earlier today but I saw that it just sits idle, and since it was no longer supported I removed the prefpane. Then I found afsctool again.

This was before the 0 byte timestamp though :-/

@wmertens
Copy link
Author

I should have tested it, it's not an issue:

$ ll -i test*
8703776780 -rw-r--r-- 2 wmertens 8082 Jan 10 15:17 test1
8703776780 -rw-r--r-- 2 wmertens 8082 Jan 10 15:17 test2

$ afsctool -cv test1
/path/test1:
Compression type: decmpfs xattr (3)
File size (uncompressed; reported size by Mac OS 10.6+ Finder): 8082 bytes / 8 KB (kilobytes, base-10)
File size (compressed): 2690 bytes / 3 KiB
Compression savings: 66.7%
Number of extended attributes: 0
Total size of extended attribute data: 0 bytes
Approximate total file size (compressed data fork + EA + EA overhead + file overhead): 2690 bytes / 3 KiB
Uncompressed file size reported in compressed header: 8082 bytes

$ ll -i test*
8703776780 -rw-r--r-- 2 wmertens 8082 Jan 10 15:17 test1
8703776780 -rw-r--r-- 2 wmertens 8082 Jan 10 15:17 test2

$ afsctool -l .
/path/test1
/path/test2

So it was something else. Urgh.

@RJVB
Copy link
Owner

RJVB commented Jan 10, 2019 via email

@RJVB
Copy link
Owner

RJVB commented Jan 10, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants