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

Internal cache writer generates incorrect files #23

Closed
shundhammer opened this issue Aug 11, 2016 · 4 comments
Closed

Internal cache writer generates incorrect files #23

shundhammer opened this issue Aug 11, 2016 · 4 comments
Labels

Comments

@shundhammer
Copy link
Owner

qdirstat /   

-> 7.8 GB total

Menu "File" -> "Write to Cache File" -> save as file "root-internal.cache.gz"

qdirstat -c root-internal.cache.gz   

-> 457 MB total

qdirstat-cache-writer / root-script.cache.gz

qdirstat -c root-script.cache.gz

-> 7.8 GB total

@shundhammer
Copy link
Owner Author

See also #22

@shundhammer
Copy link
Owner Author

This section seems to be the culprit:

D //var/lib/ucf/cache   4096    0x54c394c3
F   :etc:samba:smb.conf 9542    0x53ceef43
F   :etc:rsyslog.d:50-default.conf  1655    0x51701cf6
F   :etc:papersize  3   0x54c394c3
F   :etc:ufw:after6.rules   915 0x531104c3
F   :etc:default:grub   1307    0x5562072d
F   :etc:gconf:2:path   1421    0x533306a4
F   :etc:ufw:after.rules    1004    0x531104c3
F   :etc:ufw:before6.rules  3225    0x531104c3
F   :etc:ufw:before.rules   2667    0x531104c3

The qdirstat-perl-writer script generated this correctly - together with the (weird, but legal) colons in the file names. The internal cache writer created this:

D /var/lib/ucf/cache    4K  0x54c394c3
F       2667    0x531104c3
F       3225    0x531104c3
F       1004    0x531104c3
F       1421    0x533306a4
F       1307    0x5562072d
F       915 0x531104c3
F       3   0x54c394c3
F       1655    0x51701cf6
F       9542    0x53ceef43

So the file name column is completely missing.

OTOH it also didn't complain upon reading, so error handling leaves to be desired here, too.

@shundhammer
Copy link
Owner Author

shundhammer commented Aug 11, 2016

Step 1 done: Improve error handling.

There are now complaints in the log for such lines in a cache file, and the cache reader gives up reading the file after 1000 such errors. The affected directories are now also marked as having a read error in the GUI (right now with a little lock on the folder icon which might be a bit misleading, but that's similar to having insufficient permissions to read a directory tree from a live file system).

@shundhammer
Copy link
Owner Author

Fixed.

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

No branches or pull requests

1 participant