Menu

#27 Application fails completely when encountering files with newlines in the name

None
closed-fixed
nobody
None
5
2020-12-04
2020-08-18
No

When it encounters a file with a newline in the name, the program gives the comment "does not look like du output" and then the portion of the filename after the newline(see attached). Unfortunately, this makes it difficult to understand the exact issue(I had to pop open a debugger to understand what was going on and even then it took some detective work). To (hopefully) alleviate this, I've created a patch that rewords the error a bit and specifically calls attention to du's output itself if xdiskusage is the one calling the program. I've also created a second, more involved patch that invokes the option to end du output with null to avoid the issue entirely(though it appears all the platforms specifically defined don't have the option, so I've bypassed them); as a bonus, it also replaces the fixed 2048 character buffer with a dynamically-sized one.

3 Attachments

Discussion

  • txtsd

    txtsd - 2020-12-03

    I encountered this error today with a filename that had a newline in it for some reason. Please consider fixing the issue and/or applying this patch.

     

    Last edit: txtsd 2020-12-03
  • Bill Spitzak

    Bill Spitzak - 2020-12-04

    Patch applied! It worked great. It is in the git repository, have not built new versions yet (unclear if people use them but that is what website points to).

     
  • Bill Spitzak

    Bill Spitzak - 2020-12-04
    • status: open --> closed-fixed
    • Group: -->
     
  • Bill Spitzak

    Bill Spitzak - 2020-12-04

    Patched version worked great.

     

Log in to post a comment.