Summary: | when changing a larger file in an archive, Ark asks for confirmation twice | ||
---|---|---|---|
Product: | [Applications] ark | Reporter: | david |
Component: | general | Assignee: | Elvis Angelaccio <elvis.angelaccio> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | barryvdean, bugseforuns, c3i8zv295, edkasp, katyaberezyaka, nate, rthomsen6 |
Priority: | NOR | Keywords: | investigated, triaged |
Version: | 20.04.0 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/utilities/ark/commit/9074c10373681de1567fef0ee35a690d8514b4b5 | Version Fixed In: | 21.04 |
Attachments: |
test archive (4 kB of lorem ipsum in a 7z archive)
success and fail Ark 17.12.3 ran with QT_LOGGING_RULES=ark.*.debug=true Two prompts from Ark |
Description
david
2017-07-22 22:13:17 UTC
Seems to work as expected here. Could you attach an affected test archive? Created attachment 107165 [details]
test archive (4 kB of lorem ipsum in a 7z archive)
I've just created this archive as a test and editing the contents (e.g., when I added the heading to the beginning) does trigger confirmation twice. The same happens with formats other than 7z.
Interestingly, I haven't experienced such behavior with a archives recently downloaded from GitHub ("Clone or download" > "Download ZIP").
Cannot reproduce... It could be this got fixed between versions 16.12.3 and 17.08, even though this part of the code did not change much. Please ask in a forum of your distribution if you can install ark version 17.08 from backport PPAs to verify. Currently running Ark 17.04.3 in Kubuntu 17.10 and the bug still occurs. I've just tested the attached test archive and that worked alright, but Ark basically always asks for confirmation twice, when I edit my personal encrypted archive (~8kB; 7z w/ AES256). I can confirm it but it's a very tricky. In Kubuntu 17.10 (Plasma 5.10.5, Ark 17.04.3) I can recreate it almost every time. But the issue shows itself only from a second attempt. So, first time txt file is edited, everything's fine. When I try to do it second time (without closing Ark) then it appears almost every time. I was also able to achieve it in Neon Git Stable (Plasma 5.12.2, KF 5.43.0, Qt 5.10.0, Ark 17.12.2) but it happens randomly (2 "wins" in 15+ tries) I think never in a first attempt (of txt editing), rarely in a second attempt. Any ideas/advice what kind of information (and how) can I try to catch when able to make this issue occur? Created attachment 110999 [details]
success and fail
Ark run as "QT_LOGGING_RULES=ark.*.debug=true ark"
Success and fail (double confirmation) scenario konsole log.
Not sure if it's gonna be helpful, but clearly visible that ark notices need of re-upload ("ark.part: Watched file modified: "/tmp/ark-qNaWWO/lorem-ipsum.txt"") 2 times - line 13 and 14 in fail.txt
It happens after saving a modified file.
What's weird - sometimes it happens (2 lines "ark.part: Watched file modified" appear) as in fail.txt
And sometimes - just one line appears as in success.txt.
Everything happens with the same test.7z archive attached in this ticket.
Tested in Neon Git Stable, Plasma 5.12.2, KF 5.43.0, Qt 5.10.0
Created attachment 112918 [details]
Ark 17.12.3 ran with QT_LOGGING_RULES=ark.*.debug=true
Reproduced again with Ark 17.12.3. The attachment contains output similar to Edmund's.
environment: Kubuntu 18.04, KDE Plasma 5.12.5, KDE Frameworks 5.44.0, Qt 5.9.5
The behaviour described in the first comment is indeed what you see. On my system (Fedora 29, Plasma 5.14.5, Ark 18.4.3) I created a text file, archived it as a .tar.gz with Ark, then used "Open with..." in Ark to edit it in Kate, Increased the file size by duplicating the text and then saved it. Ark asked twice to confirm overwrite of the file in the archive. See attached screen shot. Created attachment 118492 [details]
Two prompts from Ark
Clicking the "Yes" button results in a path update confirmation dialog, which happens for each of these Yes/No boxes.
Just to add, I'm a newbie with Bugsquad. Details of test system: Ark version 18.4.3 Plasma version 15.4.5 KDE Frameworks version 5.55.0 Qt version 5.11.3 I have recently upgraded to Kubuntu 19.10 Beta (KDE Apps 19.04.3), and the issue is still present. I experience the same bug. Everytime a file is modified and written back to the archive, ark asks twice for confirmation. Running Manjaro with KDE Plasma 5.18.4 *** Bug 430512 has been marked as a duplicate of this bug. *** A possibly relevant merge request was started @ https://invent.kde.org/utilities/ark/-/merge_requests/25 Git commit 9074c10373681de1567fef0ee35a690d8514b4b5 by Elvis Angelaccio, on behalf of Jan Paul Batrina. Committed on 15/02/2021 at 22:17. Pushed by elvisangelaccio into branch 'master'. Display confirmation dialog only once when files in archive are modified Since QFileSystemWatcher::fileChanged is emitted everytime flush() is called on a file, slotWatchedFileModified gets called multiple times, especially for large files. (see https://bugreports.qt.io/browse/QTBUG-8244) If no new fileChanged signal is emitted 200ms after the last one, we interpret that as "the file has been fully written" 200ms was arbitrarily chosen to be a balance between a long enough flush interval and "instant" feedback to the user, but it can be fine tuned later. M +28 -1 part/part.cpp M +5 -0 part/part.h https://invent.kde.org/utilities/ark/commit/9074c10373681de1567fef0ee35a690d8514b4b5 |