Bug 401151 - docx files opened as archives in remote folders
Summary: docx files opened as archives in remote folders
Status: RESOLVED FIXED
Alias: None
Product: kio-gdrive
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-17 22:53 UTC by Marcus
Modified: 2020-03-23 18:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.3


Attachments
File association setted (75.71 KB, image/png)
2018-11-17 22:53 UTC, Marcus
Details
Docx file inside Google drive folder (48.56 KB, image/png)
2019-06-26 10:50 UTC, Marcus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus 2018-11-17 22:53:40 UTC
Created attachment 116375 [details]
File association setted

It is impossible to set remote files .docx to open with libreoffice. They will always open with Ark. This happen (for me) only on the google drive folder, when moved locally everithing works as expected.

STEPS TO REPRODUCE
1. Setup Google drive directory
2. Open Dolphin and go to "gdrive:account/"
3. Copy a .docx file in some folder
4. Open the file with Dolphin (as usual, by double clicking)
   Ark will open
5. Set the file to be opened with LibreOffice (see the attachment)
6. Go to number 3

OBSERVED RESULT
Locally it works as expected

EXPECTED RESULT
The association of docx -> LibreOffice should be remembered

SOFTWARE/OS VERSIONS
Kubuntu 18.10 updated
KDE Plasma Version: 5.14.3
KDE Frameworks Version: 5.52.0
Qt Version: 5.11.1
Comment 1 Kai Uwe Broulik 2018-11-19 07:19:51 UTC
Does this only happen with gdrive kio or also other remote locations like sftp, ftp, smb, etc?
Comment 2 Marcus 2018-11-19 09:41:49 UTC
I don't have all those opportunities to test remote protocols.
In the case of FTP, it works correctly (I used this https://dlptest.com/ftp-test/), it open with LibreOffice (though I cannot read it from that server).

I also noted the icon is different when I copy a file to google drive the icon becomes the one of archives (yellow). When a docx file is moved/copied to another location, it changes back to the violet document icon.
Comment 3 Marcus 2019-06-26 10:50:19 UTC
Created attachment 121152 [details]
Docx file inside Google drive folder
Comment 4 Marcus 2019-06-26 10:51:22 UTC
Just small additional information. The bug is still relevant in Plasma 5.16.1 and KDE Frameworks 5.59.0

.doc files are correctly recognized.
Comment 5 David Barchiesi 2019-09-10 08:44:40 UTC
Git commit f4d723270ce97133c6dd56db36583226ca6abc49 by David Barchiesi.
Committed on 09/09/2019 at 14:56.
Pushed by barchiesi into branch 'master'.

Fix mimeType loss during file creation or update.

Summary:
LibKGAPI allows specifying the mimeType of an upload via the associated `KGAPI2::Drive::File`.
This is required in uploads where the data isn't sufficient in determining the mime-type (i.e. docx files as reported in [[ https://bugs.kde.org/show_bug.cgi?id=401151 | BUG 401151 ]]).

Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: dvratil, #kio_gdrive

Tags: #kio_gdrive

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

M  +10   -4    src/kio_gdrive.cpp
M  +1    -1    src/kio_gdrive.h

https://commits.kde.org/kio-gdrive/f4d723270ce97133c6dd56db36583226ca6abc49