Closed antonhagg closed 8 years ago
@antonhagg Tell me more about your case and the error you're getting. In my tests, incomplete files do have md5 hashes.
I see now that this conclusion is quite naive:
if hasattr(file_, 'currentRevision'): # a normal file
We should really explicitly test for the file's state
instead. Maybe you're encountering corrupt files? What's the value of state
in those files, do you know?
@antonhagg Please test the newly commited code in 6c844dd and let me know if it fixes things for you
I cant remember, but I think the file had no values at all, just the state incomplete. Could this be linked with #104?
I have tried to figure this thing out, and latest commit doesn't return any error: 1c41eaabb6e8c74e660b70a58121017328694f2f
Thank you for your detective work, @antonhagg, as you see I have used some of your logic in 6c844dd. So I'm considering this as fixed.
When going through the code in the JFSFileDirList class i found that it takes into consideration that an incomplete file doesn't have a size. This is the case for md5 aswell and therefore I think the code should be:
insted of the code: