|Summary:||filetransfer: shared non-media files get timestamp as name|
|Product:||[Applications] kdeconnect||Reporter:||Mauro Panzeri <damonhill82>|
|Component:||android-application||Assignee:||Albert Vaca <albertvaka>|
|Latest Commit:||http://commits.kde.org/kdeconnect-android/e459d792d01268ab6889fc584cac0520ef78e0e8||Version Fixed In:|
|Attachments:||Here's a patch to manage filename and size when the scheme of the uri is "file://"|
Description Mauro Panzeri 2013-10-06 00:46:41 UTC
non-media files get timestamp as name instead of their real name when they are transferred on apaired device. Works ok for media files (audio, images...) Reproducible: Always Steps to Reproduce: 1. select a file (EG: foo.txt) from the file manager on Android 2. share 3. select kdeconnect 4. select a paired device (EG: mylaptop) Actual Results: on the desktop mylaptop appear a file named with a unix timestamp instead of foo.txt Expected Results: foo.txt should be created.
Comment 1 Mauro Panzeri 2013-10-06 01:05:14 UTC
The problem resides in the ShareToReceiver.queuedSendUriList method. When you share a file from a file-manager, the uri you get is "file://...", but the managedQuery function expects to query the media content provider, so managedQuery will return a null cursor. Here's a patch to manage filename and size when the scheme of the uri is "file://"
Comment 2 Mauro Panzeri 2013-10-06 01:06:32 UTC
Created attachment 82682 [details] Here's a patch to manage filename and size when the scheme of the uri is "file://"
Comment 3 Albert Vaca 2013-10-30 00:46:16 UTC
Git commit e459d792d01268ab6889fc584cac0520ef78e0e8 by Albert Vaca, on behalf of Mauro Panzeri. Committed on 14/10/2013 at 16:32. Pushed by albertvaka into branch 'master'. "Share to" now retrieves filename for file:// uris too Querying the ContentProvider only works for content://... uris but when you share a file from a file-manager, the uri you get has the form file://... and ContentProvider returns a null cursor. REVIEW: 113202 M +47 -27 src/main/java/org/kde/kdeconnect/UserInterface/ShareToReceiver.java http://commits.kde.org/kdeconnect-android/e459d792d01268ab6889fc584cac0520ef78e0e8