Bug 347760 - Kompare won't save the file after diff applied
Summary: Kompare won't save the file after diff applied
Status: RESOLVED FIXED
Alias: None
Product: kompare
Classification: Applications
Component: general (show other bugs)
Version: 4.1.3
Platform: Kubuntu Linux
: NOR grave
Target Milestone: ---
Assignee: Kompare developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-15 14:10 UTC by Franco Pellegrini
Modified: 2015-07-10 17:00 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Franco Pellegrini 2015-05-15 14:10:06 UTC
I open kompare on 2 directories to operate on their files, and after applying them, the files won't save with their changes, and this is printed in the konsole output:

libkomparediff: KompareModelList::saveDestination: 
libkomparediff: Tempfilename (save) :  "/tmp/kompare.L12039"
libkomparediff: Model->path+file    :  "/home/franco/less/" "variables.less"
libkomparediff: info->localdest     :  "/home/franco/less/"
libkomparediff: DestinationURL      :   QUrl( "file:///home/franco/less/" ) 
libkomparediff: tmp                 :  "variables.less"
libkomparediff: fullDestinationPath :   QUrl( "file:///home/franco/less/variables.less" ) 
Invalid URL:  QUrl( "/home/franco/less/variables.less" ) 
Invalid URL:  QUrl( "/home/franco/less/variables.less" ) 
Calling notify on "Sound"
Calling notify on "Taskbar"`

The command I use to start kompare is:

$ kompare /home/franco/less_old /home/franco/less

Reproducible: Always

Steps to Reproduce:
1. kompare directory_a directory_b
2. apply difference from file in directory_a to file in directory_b
3. try "Save" or "Save all"

Actual Results:  
Got "Could not create destination directory"

Expected Results:  
Modifications to files to be saved
Comment 1 Franco Pellegrini 2015-05-15 18:12:00 UTC
I had to downgrade, remove and install components to have this functionality working back as it should:

kompare (4:14.12.3-0ubuntu1) -> (4:15.04.0-0ubuntu1~ubuntu15.04~ppa2)

Installed
libkomparediff2-4 (4:14.12.3-0ubuntu1)

Removed
kpart5-kompare (4:15.04.0-0ubuntu1~ubuntu15.04~ppa2)
libkompareinterface5:amd64 (4:15.04.0-0ubuntu1~ubuntu15.04~ppa2)
libkomparediff2-5:amd64 (4:15.04.0-0ubuntu1~ubuntu15.04~ppa1)
Comment 2 Franco Pellegrini 2015-05-15 18:12:50 UTC
Sorry, meant to say

kompare (4:15.04.0-0ubuntu1~ubuntu15.04~ppa2) ->  (4:14.12.3-0ubuntu1)
Comment 3 Jeremy Whiting 2015-06-24 12:34:32 UTC
I've posted a patch to reviewboard for this at https://git.reviewboard.kde.org/r/124163/
Comment 4 Jeremy Whiting 2015-07-10 17:00:51 UTC
Git commit 3cffb9abc3d0c0fd3c861f65cc7738fbe7568b54 by Jeremy Whiting.
Committed on 10/07/2015 at 16:59.
Pushed by whiting into branch 'master'.

Use KIO::Overwrite when saving a changed file otherwise it always fails.
REVIEW:124163

M  +2    -2    komparemodellist.cpp

http://commits.kde.org/libkomparediff2/3cffb9abc3d0c0fd3c861f65cc7738fbe7568b54