Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#191 DOS_GetFileDate wrong

0.61
closed
5
2012-09-07
2004-09-19
Jonas Maebe
No

DOS_GetFileDate (in src/dos/dos_files.cpp) uses RealHandle(entry)
as file handle on the real filesystem, which is wrong (the real file
handle is stored inside the DOS_Files[handle] class instance).

DOS_GetFileDate should probably be implemented as a method of
the DOS_File or localFile class. It could possibly call through to the
localDrive::FileStat() method, though I'm not sure how to get the
correct localDrive from the DOS_File/localFile instance.

GetFileDate (and SetFileDate) seem to be necessary for Turbo
Pascal 7 to be able to save any files (it has something to do with
creating backups of the source files).

I'll attach a test program.

Discussion

  • Jonas Maebe
    Jonas Maebe
    2004-09-19

    Test program for getting/setting file date/time.

     
    Attachments
  • Peter Veenstra
    Peter Veenstra
    2004-09-19

    Logged In: YES
    user_id=535630

    I think I know what you mean. I think i fixed it as well.

     
  • Jonas Maebe
    Jonas Maebe
    2004-09-19

    Logged In: YES
    user_id=527169

    Where exactly? I can't see any changes in src/dos/dos_files.cpp using
    cvsweb (or does it run behind compared to regular cvs?)

     
  • Peter Veenstra
    Peter Veenstra
    2004-09-28

    Logged In: YES
    user_id=535630

    tested that fdate. set time is faked in dosbox so the file
    doesn't get the time but the application thinks it succeeded.

    Reading of the time worked fine.

     
  • Jonas Maebe
    Jonas Maebe
    2004-09-28

    Logged In: YES
    user_id=527169

    Thanks for the test. I just checked out from cvs, but Turbo Pascal 7 still
    cannot save any files (still complains it cannot create any backup file). I
    suppose it needs real setdate support. Under *nix, this can be done
    using the utimes() function. I don't about Windows.

    Another thing I mentioned with the cvs version, is that azerty supports
    now seems to be completely broken (it worked half before): I simply
    cannot type any special characters (such as "/" and ":") anymore if I
    don't change my keyboard layout to qwerty before starting dosbox.

     
  • Jonas Maebe
    Jonas Maebe
    2004-09-28

    Logged In: YES
    user_id=527169

    Regarding the cvs version: s/mentioned/noticed. Sorry, it's late. I'm also
    not sure where the ugly wrapping comes from.

     
  • Peter Veenstra
    Peter Veenstra
    2004-10-17

    Logged In: YES
    user_id=535630

    Bug fixed.
    it had nothing to do with date and time
    it was a return value for delete.

    see
    http://vogons.zetafleet.com/viewtopic.php?t=6817
    for more information.

     
  • Jonas Maebe
    Jonas Maebe
    2004-10-18

    Logged In: YES
    user_id=527169

    Thanks, I can verified it's fixed.