Bug 13905 - changes to read-only .classpath file are not thrown out
Summary: changes to read-only .classpath file are not thrown out
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M6   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 6165 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-04-16 11:49 EDT by Jed Anderson CLA
Modified: 2002-07-11 11:37 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jed Anderson CLA 2002-04-16 11:49:40 EDT
Build: 20020409

1. Make a project, ProjA.
2. Change ProjA's .classpath file to read-only.
3. Open the Java Build path properties on ProjA, and change the output directory
to be bin.
4. Hit ok, the save fails with an error.
5. Close the properties dialog.
6. Open the properties on ProjA again.
7. The the output path is still bin. <- bug

Note:  The .classpath file does not change (as expected)
Comment 1 Philipe Mulet CLA 2002-04-22 19:09:45 EDT
We should re-read the file contents if unable to write over it.
Comment 2 Philipe Mulet CLA 2002-04-23 06:43:01 EDT
Changed the implementation to perform file saving before applying the classpath 
change. If unable to write, then the change is a noop.

Fixed
Comment 3 Philipe Mulet CLA 2002-04-23 08:41:48 EDT
*** Bug 6165 has been marked as a duplicate of this bug. ***
Comment 4 Philipe Mulet CLA 2002-07-11 06:55:44 EDT
Backporting this fix to 1.0 stream. Fix for it is slightly different for 
reducing the amount of touched code. We simply restore old classpath, build 
order and classpath markers if exception is thrown while writing classpath file.

Released in version 'v_144'.
Comment 5 Philipe Mulet CLA 2002-07-11 11:37:23 EDT
Actually, also need to protect the SetOutputLocationOperation as well.
Fix released into v_144a