#215 DrJava can save over read-only files

closed-fixed
5
2003-08-05
2003-08-04
Don Eubanks
No

I've noticed that if I open up a file in DrJava that has
been marked "Read-Only", make changes to the file, and
click the "Save" button, I do not get the I/O error
warning about the read-only status of the file, the file is
saved over the read-only version, and the new file is not
read-only. This bug occurs in version 2003-07-24, and
it does not occur in version 2003-03-13. It's currently
wreaking havoc on my source control...

Discussion

  • James Hsia

    James Hsia - 2003-08-04

    Logged In: YES
    user_id=557360

    Yes, this is a serious bug, thanks for bringing it to our
    attention. We have located the source of the problem and are
    working on fixing it.

    The reason why it no longer works correctly is that right
    after the 2003-03-13 release, we refactored the save file
    process. We don't get an IOException anymore because at one
    point we call "f.delete()", where f is the file to be saved,
    and Java lets it go through even though f is read-only.

    James

     
  • James Hsia

    James Hsia - 2003-08-04
    • status: open --> closed-fixed
     
  • James Hsia

    James Hsia - 2003-08-04

    Logged In: YES
    user_id=557360

    This bug has been fixed.
    If you want a working version to try out now, you can get it at:
    http://drjava.sourceforge.net/downloads/drjava-fixed-save.jar

    Otherwise, we are planning on having a new development
    release in a few days, so you can wait for that one.

    I'll close this bug. Tell us if you have any more problems.

    James

     
  • Nobody/Anonymous

    Logged In: NO

    Thanks, I have found that the version you linked (drjava-
    fixed-save.jar) gives the proper I/O exception when trying to
    save over a read-only file. However, this version does not
    seem to be able to create new files. (the same I/O exception:
    Permission Denied is given)

     
  • Don Eubanks

    Don Eubanks - 2003-08-05

    Logged In: YES
    user_id=837419

    That comment below was actually from me... I'll master this
    log-in concept yet...

     
  • James Hsia

    James Hsia - 2003-08-05
    • assigned_to: nobody --> jhsia
     
  • James Hsia

    James Hsia - 2003-08-05

    Logged In: YES
    user_id=557360

    Yes, thanks to our unit tests, we noticed this bug this
    morning. It has already been fixed. We are in the process of
    posting a new development release. Look for it sometime this
    afternoon and try it out!

    James

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks