Menu

#2079 Fix crash with weird filetimes (and cleanup the code)

Branch_+_Trunk
closed-accepted
5
2006-11-21
2006-11-02
Kimmo Varis
No

Bug: #1579472 Runtime Error during folder compare
https://sourceforge.net/tracker/index.php?func=detail&aid=1579472&group_id=13216&atid=113216

I couldn't figure out to properly handle weird
filetimes got from findfile. So I decided to use stat()
instead as it returns missing filetimes as zeros. Or so
I thought. Luckily it returns them as negative value,
so we can at least detect them.

While I changed FileInfo to use stat() I could just
remove the code calling findfile() and cleanup the
code. Then I noticed that FileInfo's Update() and
DiffFileInfo's Update() became identical other than
return value. So I added return value for FileInfo's
Update() and removed the DiffFileInfo's update.

I also did similar findfile() to stat() change for
dirscan.cpp's enumeration routine.

I also added some checks for filetimes being zeroes.

Discussion

  • Kimmo Varis

    Kimmo Varis - 2006-11-02

    Original and altered files

     
  • Kimmo Varis

    Kimmo Varis - 2006-11-03

    Logged In: YES
    user_id=631874

    Committed to SVN trunk.
    Completed: At revision: 3768

     
  • Kimmo Varis

    Kimmo Varis - 2006-11-03
    • assigned_to: nobody --> kimmov
    • status: open --> open-accepted
     
  • Kimmo Varis

    Kimmo Varis - 2006-11-21

    Logged In: YES
    user_id=631874
    Originator: YES

    Committed to 2.6 branch.
    Completed: At revision: 3825

    Closing.

     
  • Kimmo Varis

    Kimmo Varis - 2006-11-21
    • status: open-accepted --> closed-accepted
     
  • Nobody/Anonymous

    Logged In: NO

    http://cb2c9bb18eb7db39e64238feba63a953-t.qjhuma.org <a href="http://cb2c9bb18eb7db39e64238feba63a953-h.qjhuma.org">cb2c9bb18eb7db39e64238feba63a953</a> [url]http://cb2c9bb18eb7db39e64238feba63a953-b1.qjhuma.org[/url] [url=http://cb2c9bb18eb7db39e64238feba63a953-b2.qjhuma.org]cb2c9bb18eb7db39e64238feba63a953[/url] [u]http://cb2c9bb18eb7db39e64238feba63a953-b3.qjhuma.org[/u] 5da269d70f258be2341c2332392a1020

     

Log in to post a comment.