Bug 379849 - Rip fails to start when using clone mode and target exsists
Summary: Rip fails to start when using clone mode and target exsists
Status: RESOLVED FIXED
Alias: None
Product: k3b
Classification: Applications
Component: Copying (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: k3b developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-15 12:57 UTC by Chris Rizzitello
Modified: 2017-06-09 15:09 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Disc Copy Dialog (43.56 KB, image/png)
2017-05-16 11:07 UTC, Chris Rizzitello
Details
The file that are existing (12.43 KB, image/png)
2017-05-16 11:08 UTC, Chris Rizzitello
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Rizzitello 2017-05-15 12:57:16 UTC
When copying a CD in CLONE mode if the target files exsist the copy process never starts. The overwrite prompt is shown then the job just never starts . If you delete the toc and iso that exsist the job will then start as expected.
Comment 1 Leslie Zhai 2017-05-16 03:44:27 UTC
Hi Chris,

Could you provide detailed steps and attach some screenshots is better to reproduce the bug? I only use the simulator CDEmu http://www.leetcode.cn/2016/08/k3b.html#test so I can not reproduce it, thanks a lot!

Regards,
Leslie Zhai
Comment 2 Chris Rizzitello 2017-05-16 11:07:20 UTC
Created attachment 105589 [details]
Disc Copy Dialog

The setting used in my copy (Note Copy mode is set to Clone)
Comment 3 Chris Rizzitello 2017-05-16 11:08:37 UTC
Created attachment 105590 [details]
The file that are existing

The Files its going to try to write are here already
Comment 4 Chris Rizzitello 2017-05-16 11:09:45 UTC
Hope this helps find this bug
Comment 5 Leslie Zhai 2017-05-17 02:08:23 UTC
Hi Chris,

Thanks for your screenshot!

But could you provide the screenshot for The overwrite prompt, I doubt it might be the bug about related dialog.

Regards,
Leslie Zhai
Comment 6 Chris Rizzitello 2017-05-17 10:57:02 UTC
Yesterday i had upgraded to 17.04.1 release of k3b and this issue seams to be resolved as I don't get an overwrite prompt at all it just picks a new file name 
if the file exists
Comment 7 Leslie Zhai 2017-05-18 02:29:19 UTC
Hi Chris,

> it just picks a new file name if the file exists

is that ok? to fix your issue :)

Regards,
Leslie Zhai
Comment 8 Chris Rizzitello 2017-05-18 11:25:11 UTC
It does fix the problem of the rip not starting, however I do think k3b should prompt if the target exists for clone opperations. This is what happens for non clone opperations and this behavior should be consistant throuh out the application.
Comment 9 Chris Rizzitello 2017-05-30 13:36:33 UTC
After some further testing I think i have found the exact case where this is failing. 

if you copy a disc in clone mode with no disc label then copy another disc with no label. In this case instead of picking a file new file name it will use the default k3bimage.iso and k3bimage.iso.toc . in this case if those files exist when you try to copy the second disc the process will never start. if you try to copy the same non labeled disc twice it will just make a new image under a new name.
Comment 10 Leslie Zhai 2017-06-06 02:55:22 UTC
Hi Chris,

Sorry for my late response, I am doing my work assignment about L4 recently http://os.inf.tu-dresden.de/pipermail/l4-hackers/2017/ I will fix the bug in Thursday this week :)

Regards,
Leslie Zhai
Comment 11 Leslie Zhai 2017-06-08 02:48:53 UTC
Git commit 892df04090ae272860627026877cd2de353a90ca by Leslie Zhai.
Committed on 08/06/2017 at 02:41.
Pushed by lesliezhai into branch 'master'.

Check for m_tempDirSelectionWidget->tempPath() and
m_tempDirSelectionWidget-tempPath() + ".toc"

For example, if /tmp/k3b.iso and /tmp/k3b.iso.toc exist, then it
needs to ask user 'Do you want to overwrite XXX?' should
K3b::MediaCopyDialog automatically delete tmp files? I argue that
it is better to mv tmp files by user.

M  +3    -1    src/misc/k3bmediacopydialog.cpp

https://commits.kde.org/k3b/892df04090ae272860627026877cd2de353a90ca
Comment 12 Leslie Zhai 2017-06-08 02:52:06 UTC
Hi Chris,
 
> Check for m_tempDirSelectionWidget->tempPath() and
> m_tempDirSelectionWidget-tempPath() + ".toc"
> 
> For example, if /tmp/k3b.iso and /tmp/k3b.iso.toc exist, then it
> needs to ask user 'Do you want to overwrite XXX?' should
> K3b::MediaCopyDialog automatically delete tmp files? I argue that
> it is better to mv tmp files by user.

in your ~/.config/k3brc, there are:

[General Options]                                                                  
...                                                                  
Temp Dir=/tmp
...

so I argue that it is better to mv exist tmp files by user, but not by K3b::MediaCopyDialog, thoughts? thanks!

Regards,
Leslie Zhai
Comment 13 Chris Rizzitello 2017-06-08 12:25:21 UTC
Im not sure of what your asking. If the file exsists the do you want to overwrite box does comeup . after you click yes the process of coping does not start.
Comment 14 Leslie Zhai 2017-06-09 03:39:28 UTC
Git commit 9bf5cdeef5803445ca7f67dd54ae694147e0fd53 by Leslie Zhai.
Committed on 09/06/2017 at 03:37.
Pushed by lesliezhai into branch 'master'.

Fix BurnProgressDialog delete wrongly issue.

M  +2    -6    src/misc/k3bmediacopydialog.cpp

https://commits.kde.org/k3b/9bf5cdeef5803445ca7f67dd54ae694147e0fd53
Comment 15 Leslie Zhai 2017-06-09 03:40:16 UTC
Hi Chris,
 
> Fix BurnProgressDialog delete wrongly issue.
> 
> M  +2    -6    src/misc/k3bmediacopydialog.cpp
> 
> https://commits.kde.org/k3b/9bf5cdeef5803445ca7f67dd54ae694147e0fd53

Please verify, thanks a lot!

Regards,
Leslie Zhai
Comment 16 Chris Rizzitello 2017-06-09 12:02:46 UTC
I've Built and Tested this is working perfectly now. Both the .img and .img.toc ask if i want to overwrite and then the process starts. Marking as Fixed !
Comment 17 Chris Rizzitello 2017-06-09 12:16:28 UTC
Sorry i had to reopen this, it now crashes after you close the copy dialog ..
Comment 18 Leslie Zhai 2017-06-09 14:51:44 UTC
Git commit 01d478f6dbbf97e358c02346fd14d111511f88be by Leslie Zhai.
Committed on 09/06/2017 at 14:50.
Pushed by lesliezhai into branch 'master'.

Fix segfault for K3b::MediaCopyDialog

M  +14   -2    src/misc/k3bmediacopydialog.cpp

https://commits.kde.org/k3b/01d478f6dbbf97e358c02346fd14d111511f88be
Comment 19 Leslie Zhai 2017-06-09 14:59:26 UTC
Hi Chris,

> Fix segfault for K3b::MediaCopyDialog
> 
> M  +14   -2    src/misc/k3bmediacopydialog.cpp
> 
> https://commits.kde.org/k3b/01d478f6dbbf97e358c02346fd14d111511f88be

Please verify it, thanks!

Regards,
Leslie Zhai
Comment 20 Chris Rizzitello 2017-06-09 15:08:23 UTC
No longer crashes when i close the copy dialog :D  I will close it again.
Comment 21 Leslie Zhai 2017-06-09 15:09:57 UTC
Hi Chris,

> No longer crashes when i close the copy dialog :D  I will close it again.

Thanks for your test patiently!

Regards,
Leslie Zhai