Bug 364093

Summary: No warning if file could not be saved
Product: [Applications] lokalize Reporter: Friedrich W. H. Kossebau <kossebau>
Component: generalAssignee: Simon Depiets <sdepiets>
Status: RESOLVED FIXED    
Severity: normal CC: sdepiets, valtermura
Priority: NOR    
Version First Reported In: 2.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Friedrich W. H. Kossebau 2016-06-08 11:05:22 UTC
When trying to save a file under another name and trying to do so in a folder where the user has no write rights, there is no feedback to the user that saving failed.

Reproducible: Always

Steps to Reproduce:
1. Load a po(t) file
2. Select "Save as..." from the menu
3. In filedialog, select a folder where the user has no write rights, so cannot create a new file
4. In filedialog, enter some name for the file to save, e.g. "test.po"
5. In filedialog, select "Save" button to continue with saving

Actual Results:  
Application silently fails to write the file.

Expected Results:  
Error message that the file cannot be saved under the selected folder and name, then showing the dialog again with the entered values (folder + filename), to allow the user to fix up any issues (like changing rights on the folder).
Comment 1 Simon Depiets 2018-08-09 03:16:09 UTC
Actually the root cause is different,
in your situation the file probably isn't saved because there hasn't been any changes in it. If you amend it and save it to /etc for instance, you'll get the error message.

https://phabricator.kde.org/D14699
Comment 2 Simon Depiets 2018-08-13 01:08:25 UTC
Git commit fcd47259b449aa03b2e61e934d79b2bef7da7788 by Simon Depiets.
Committed on 13/08/2018 at 01:08.
Pushed by sdepiets into branch 'master'.

Save as saves the file to a new path even if there was no changes

Summary:
Currently the file is not "saved as" if it hasn't been modified, which can lead to some confusion.
With this revision the file will be saved as long as the new path is different from the old one.

Reviewers: #localization, aacid, ltoscano, shaforostoff, mlaurent

Reviewed By: #localization, aacid

Tags: #localization

Differential Revision: https://phabricator.kde.org/D14699

M  +0    -1    src/catalog/catalog.cpp
M  +7    -7    src/editortab.cpp
M  +1    -1    src/editortab.h

https://commits.kde.org/lokalize/fcd47259b449aa03b2e61e934d79b2bef7da7788
Comment 3 Simon Depiets 2018-10-27 01:57:08 UTC
*** Bug 400301 has been marked as a duplicate of this bug. ***