-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
qdirstat-cache-writer creates broken cache file if some directory lacks Exec flag #9
Comments
Glad to see that finally after all these years (it's been in KDirStat for a long, long time) somebody really uses those features seriously. And even more glad to get such really high-quality bug reports with everything needed to track things down. Thank you! I'll look into this. |
This should be fixed with 0c2a3b1 . Please check. The handling is not as graceful as one could expect, though: The error is written to the cache file, but it's currently not visible in the QDirStat GUI that lstat() failed for the directory contents: It looks just like a normal directory with no content. Handling this better would require extending the cache file format to properly store that information. I am somewhat reluctant to change that file format since I know that it seems to be in use for some home-cooked admin scripts or applications. Let me think how this could be handled. |
The fix works fine. I tested newest qdirstat-cache-writer on the problematic directory here, and qdirstat correctly displayed the cache file. Btw. thanks a lot for providing the cache writing script at all! I've been using kdirstat-cache-writer.pl in a cronjob for quite a while already, to index my data partition with its 3 million files; and kdirstat/qdirstat is simply the only tool that provides this feature and is sufficiently detailed. Filelight doesn't seem to have this feature at all, and Baobab got this cache-file feature only recently but it doesn't show single files at all. So kudos for writing kdirstat/qdirstat, it has been really helpful for me already! |
If qdirstat-cache-writer encounters a directory which lacks the "executable" flag, it will create a broken cache file that cannot be completely read by qdirstat (only entries up to the broken line will be displayed in qdirstat).
The broken lines lack a size value, ie. there are two tab characters without a number inbetween.
Here's an example file: .qdirstat.cache.gz. It should list subdir1, subdir2 and subdir3, but since subdir2 is unreadable, subdir3 is not even listed anymore in qdirstat. Also, qdirstat has a total size of 2 MB for the entire tree, while
du
shows a size of 3 MB (and actually there are 4 MB of data, but the size of subdir2 cannot be detected obviously).This is output of
ls -lRa
for that test directory:When I ran qdirstat-cache-writer on the test directory, these Perl warnings were printed:
This happens with the latest qdirstat version (f33cba3), and it also happened with kdirstat-cache-writer.pl and k4dirstat 2.7.8-4-ge61717f.
The text was updated successfully, but these errors were encountered: