Menu

#319 Short file reported as too long

workingwiki
open
nobody
None
5
2013-07-24
2013-07-19
No

Please see http://lalashan.mcmaster.ca/theobio/projects/index.php/Parse. The .csv file is 3B long, but WW reports it is "too large for display".

Discussion

  • Lee Worden

    Lee Worden - 2013-07-19

    I'm also seeing a related issue, which is that when a file's too large,
    it shouldn't refer you to a GetProjectFile page that will just tell you
    the same thing, it should just give you the download link. I'll see if
    I can fix both things easily.

     
  • Lee Worden

    Lee Worden - 2013-07-19

    That's kind of weird :) Looking into it.

     
  • Lee Worden

    Lee Worden - 2013-07-24

    fixed the download link. working on the original problem.

    turns out the cause is sort of embarassing. the find_file_contents() function returns the content of the file it's asked for, or -1 in case the file is too large. in this case, the content of the file is the string "-1", so it's a false positive, so to speak.

     
  • Lee Worden

    Lee Worden - 2013-07-24

    Solution: -1 is not an appropriate flag, since it can be a legitimate return value. Use an exception instead.

     
    • Lee Worden

      Lee Worden - 2013-07-24

      Update: I changed the flag from -1 to something much less likely to arise as a false positive. So it's okay for now. Leaving open though because it's still a bug.

       

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.