Bug 393700 - [Export breakpoints] Wrong file appears in overwrite dialog and wrong file can be overwritten
Summary: [Export breakpoints] Wrong file appears in overwrite dialog and wrong file ca...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.3 M4   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2012-11-06 13:05 EST by Valentin Ciocoi CLA
Modified: 2012-12-11 15:57 EST (History)
1 user (show)

See Also:


Attachments
screenshot (62.65 KB, image/jpeg)
2012-11-06 13:05 EST, Valentin Ciocoi CLA
no flags Details
proposed patch (3.97 KB, patch)
2012-11-06 13:12 EST, Valentin Ciocoi CLA
Michael_Rennie: iplog+
Michael_Rennie: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Valentin Ciocoi CLA 2012-11-06 13:05:55 EST
Created attachment 223261 [details]
screenshot

Wrong file path appears in the overwrite dialog and wrong file gets overwritten if user chooses the overwrite option after he changed the file path in the text box.

Steps to reproduce:

1. Set two breakpoints
2. Open the breakpoints window
3. From context menu select Export Breakpoints and export breakpoints in exp1.bkpt
4. Repeat step 3 and export breakpoints in exp2.bkpt
5. Now try to export breakpoints into an existing file (i.e. exp1.bkpt)
6. When pop-up appears "Do you want to overwrite: exp1.bkpt?", click "No"
7. Change file name in textbox to "exp2.bkpt"
8. Click Finish

-> Pop-up appears with the wrong file name "Do you want to overwrite exp1.bkpt?" and if you click yes the wrong file will be overwitten (screenshot attached)

Also if user checks the overwrite option after step 7 and then clicks finish, the wrong file will be overwritten with no warning.
Comment 1 Valentin Ciocoi CLA 2012-11-06 13:12:45 EST
Created attachment 223262 [details]
proposed patch

Proposed fix: removed file path caching because it is not necessary and it is causing a wrong behavior in file overwrite usecase.
Comment 2 Michael Rennie CLA 2012-11-06 14:50:50 EST
Comment on attachment 223262 [details]
proposed patch

pushed patch to: http://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?id=7770d99165b3fd0c6e8a08e22c411f9b07362a53

Thanks for the patch Valentin!
Comment 3 Michael Rennie CLA 2012-11-06 14:51:14 EST
marking fixed
Comment 4 Michael Rennie CLA 2012-12-11 15:57:17 EST
Verified in:

Version: 4.3.0
Build id: I20121210-2000