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.
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://"
Created attachment 82682 [details] Here's a patch to manage filename and size when the scheme of the uri is "file://"
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