[krita] [Bug 376098] Saving read-only files fails silently.

2017-03-28 Thread Boudewijn Rempt
https://bugs.kde.org/show_bug.cgi?id=376098

Boudewijn Rempt  changed:

   What|Removed |Added

  Latest Commit|https://commits.kde.org/kri |https://commits.kde.org/kri
   |ta/2307e466bb2228959c965c28 |ta/9dbf40b7d3b8b70fe0b545bd
   |b0ef82b43dd8898f|fd03d74b6cee0ee9

--- Comment #5 from Boudewijn Rempt  ---
Git commit 9dbf40b7d3b8b70fe0b545bdfd03d74b6cee0ee9 by Boudewijn Rempt.
Committed on 28/03/2017 at 10:54.
Pushed by rempt into branch 'krita/3.1'.

This doesn't use QSaveFile like in master because the structure
of the unrefactoring KisDocument save and export code is way too
tangled for that.

M  +93   -92   libs/ui/KisDocument.cpp

https://commits.kde.org/krita/9dbf40b7d3b8b70fe0b545bdfd03d74b6cee0ee9

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 376098] Saving read-only files fails silently.

2017-03-28 Thread Boudewijn Rempt
https://bugs.kde.org/show_bug.cgi?id=376098

Boudewijn Rempt  changed:

   What|Removed |Added

 Status|CONFIRMED   |RESOLVED
 Resolution|--- |FIXED
  Latest Commit||https://commits.kde.org/kri
   ||ta/2307e466bb2228959c965c28
   ||b0ef82b43dd8898f

--- Comment #4 from Boudewijn Rempt  ---
Git commit 2307e466bb2228959c965c28b0ef82b43dd8898f by Boudewijn Rempt.
Committed on 28/03/2017 at 10:30.
Pushed by rempt into branch 'master'.

And use QSaveFile to be smart about the permissions and ownership.
Note that this demands a very filthy hack for saving using KoStore:
we need to make sure KArchive cannot close() the iodevice, because
that aborts if it's a QSaveFile.

For other file types, like tiff and exr, we cannot save to io
devices, we can only pass filenames to the relevant libraries. For
those, add a flag to KisImportExportFilter that IO devices aren't
supported, but rather ignored.

M  +42   -11   libs/store/KoZipStore.cpp
M  +4-5libs/store/KoZipStore.h
M  +46   -89   libs/ui/KisDocument.cpp
M  +3-0libs/ui/KisImportExportFilter.h
M  +30   -8libs/ui/KisImportExportManager.cpp
M  +0-1libs/ui/kis_png_converter.cpp
M  +1-1plugins/impex/brush/kis_brush_export.h
M  +1-0plugins/impex/exr/exr_export.h
M  +1-1plugins/impex/exr/exr_import.h
M  +1-1plugins/impex/spriter/kis_spriter_export.h
M  +1-1plugins/impex/tiff/kis_tiff_export.h
M  +1-0plugins/impex/tiff/kis_tiff_import.h
M  +1-0plugins/impex/video/kis_video_export.h

https://commits.kde.org/krita/2307e466bb2228959c965c28b0ef82b43dd8898f

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 376098] Saving read-only files fails silently.

2017-02-28 Thread Raghavendra kamath
https://bugs.kde.org/show_bug.cgi?id=376098

Raghavendra kamath  changed:

   What|Removed |Added

   Severity|grave   |critical
 CC||raghavendr.ra...@gmail.com

--- Comment #3 from Raghavendra kamath  ---
When I try to do ctrl + S on a read only file , it behaves as if it is saving,
but the title bar clearly shows a star and "(write protected)" is suffixed
after the document name, this is the only indication that it is readonly. it
doesn't show dialog box or warning message. The user who somehow missed the
title bar change wouldn't know if the file is readonly.

The actual saving does happen though, even if the file is marked readonly for
user. Even if the owner is "root" in linux systems a user can overwrite the
file.

This gets confusing as the title bar shows a star and "write protected but the
file actually gets saved . And again when you try to close the file , it
prompts for saving, when you click yes then the file is saved and the file
permission is restored to read and write for the user.

I tested with a file whose owner was root and group + others only had read
permission. After making some changes the files ownership and permission were
reverted back to user. 

I think
1) Krita shouldn't change file ownership and permissions (somewhat serious and
dangerous)
2) It should have proper warning that the file is just read only
3) It also shouldn't do the save when the file is read only, it may offer save
as option so that user can save a copy of the file.

P.S. I am marking this critical as files owned by root can be changed. In
future when we scripting ability this can turn into a nightmare in my opinion.

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 376098] Saving read-only files fails silently.

2017-02-28 Thread Boudewijn Rempt
https://bugs.kde.org/show_bug.cgi?id=376098

Boudewijn Rempt  changed:

   What|Removed |Added

 Ever confirmed|0   |1
Summary|"False" save (Krita doesn't |Saving read-only files
   |save changes, but acts  |fails silently.
   |like)   |
 CC||b...@valdyas.org
 Status|UNCONFIRMED |CONFIRMED

--- Comment #2 from Boudewijn Rempt  ---
I think that this is about read-only files, like you get when opening something
from a browser. This might indeed be broken and needs checking.

-- 
You are receiving this mail because:
You are watching all bug changes.