Bug 260454 - fileStore.copy/LocalFile.putInfo silently fail to set modified time
Summary: fileStore.copy/LocalFile.putInfo silently fail to set modified time
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-08 16:11 EST by Paul M. Suchko CLA
Modified: 2019-09-06 16:04 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 Paul M. Suchko CLA 2009-01-08 16:11:42 EST
Build ID: 3.4.0

Steps To Reproduce:
try to change the timestamp of a read only file using LocalFile.putInfo under Windows XP

More information:
fileStore.copy is not updating timetamps when copying read only files.  The root cause is that the Java method File.setModified, which it uses, is failing on these files (due to a different bug I plan to report to Sun) and this is not being detected or reported by ANY of the Eclipse calls.  

The workaround in this specific use case is to modify putInfo to call LocalFileNatives.setFileInfo (which makes the file read only) AFTER calling setLastModified so that the file is not yet read only.

N.B. that this will only work if the file is new or was NOT already read only.  If it is, then the file may be to be made NOT read only temporarily so that the mtime can be updated.
Comment 1 Eclipse Webmaster CLA 2019-09-06 16:04:46 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.