Assuming a directory like '1234_bla', then du -k 1234_bla | xdu would display '_bla' at top level.
du -k 1234_bla | xdu
This is due to (scanning whitespace and numbers):
while ((*buff >= '0' && *buff <= '9') || (*buff == ' ' || *buff == '\t')) { buff++;
A possible fix (scan for non-ws at the beginning, than for ws):
while (*buff != ' ' && *buff != '\t') { buff++; } while (*buff == ' ' || *buff == '\t') { buff++; }
The text was updated successfully, but these errors were encountered:
Better. OTOH, sscanf already found the end of number+whitespaces. Position of rest could be captured with "%n"
Addendum: Format string needs an additional " " to skip whitespace. "%lld %n" might do.
Sorry, something went wrong.
with "%n".
Please do not use this as SSID.
xdu.c: correctly parse output from du
d7f8c84
Former version would also take leading numbers from du records. (Closes github issue #26)
Closed by d7f8c84
No branches or pull requests
Assuming a directory like '1234_bla', then
du -k 1234_bla | xdu
would display '_bla' at top level.This is due to (scanning whitespace and numbers):
A possible fix (scan for non-ws at the beginning, than for ws):
The text was updated successfully, but these errors were encountered: