Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 6058

Summary: [resources] copying IFolder loses read-only flag setting
Product: [Eclipse Project] Platform Reporter: Adam Kiezun <akiezun>
Component: ResourcesAssignee: Rafael Chaves <eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dj.houghton
Version: 2.0Keywords: helpwanted
Target Milestone: 2.1 M4   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Bug Depends on:    
Bug Blocks: 3624, 6053    
Attachments:
Description Flags
patch fixing this bug none

Description Adam Kiezun CLA 2001-11-19 08:38:23 EST
i have a read-only IFolder and call copy on it - the read-only flag is not set 
on the resulting folder

as a result both navigator and package view lose that flag when copying folders
Comment 1 John Arthorne CLA 2001-11-19 10:40:03 EST
Confirmed that this is the case on Windows 2000.

This looks like a task for CoreFileSystemLibrary#internalCopyAttributes.

I have created a test case IFolderTest#testReadOnlyFolderCopy, but will comment 
out the assertion until this is fixed.
Comment 2 John Arthorne CLA 2001-11-26 13:53:36 EST
*** Bug 6060 has been marked as a duplicate of this bug. ***
Comment 3 Adam Kiezun CLA 2002-03-12 11:09:43 EST
*** Bug 6053 has been marked as a duplicate of this bug. ***
Comment 4 DJ Houghton CLA 2002-04-11 13:03:03 EDT
Verified that this is still a problem in 2002-04-09.
Comment 5 DJ Houghton CLA 2002-11-13 20:35:43 EST
See: org.eclipse.core.internal.resources.CopyVisitor.copyContents.
Comment 6 Rafael Chaves CLA 2002-11-22 14:57:34 EST
Created attachment 2496 [details]
patch fixing this bug

There was a missing call to CoreFileSystemLibrary#internalCopyAttributes when
the resource being copied was a folder.
Comment 7 Rafael Chaves CLA 2002-11-22 15:13:47 EST
Tested on Win2K and Linux.

DJ: Please verify and release. John's test case must be updated and released 
too. Leaving as new.
Comment 8 DJ Houghton CLA 2002-11-23 15:34:59 EST
Released fix and test case into HEAD.