Bug 581261 - Importing an existing project while copying in the workspace will ask permission to overwrite .settings
Summary: Importing an existing project while copying in the workspace will ask permiss...
Status: NEW
Alias: None
Product: Incubator
Classification: Eclipse Project
Component: e4 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: E4 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-22 07:50 EST by Georgiana Boglis CLA
Modified: 2023-03-03 07:20 EST (History)
1 user (show)

See Also:


Attachments
ImportOperation callstack (1.46 KB, text/plain)
2023-03-03 07:19 EST, Johan Ansems CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georgiana Boglis CLA 2022-12-22 07:50:07 EST
Importing an existing project into the workspace with the "Copy projects into workspace" option checked will ask user permission to overwrite .settings directory if the imported project contains it.
This permission is not required since the .settings directory in the destination is during the import process.

using eclipse 2022-06, eclipse platform 4.24
Comment 1 Johan Ansems CLA 2023-03-03 07:19:39 EST
Created attachment 288987 [details]
ImportOperation callstack
Comment 2 Johan Ansems CLA 2023-03-03 07:20:19 EST
Having the same issue with version 4.26 still.

during import an empty project is created first, in which the org.eclipse.core.resources.prefs is created already with your default file encoding. (encoding/<project>=UTF-8)

Then the import operation is created and it is configured to overwrite all the overwriteState to OVERWRITE_ALL(2)

However in during execution of the import operation, ImportOperation.collectExistingReadonlyFiles does not seem to check this value, and calls the queryOverwrite method anyway, which shows the confirmation dialog.

see also the "ImportOperation callstack" I have attached to this issue.