forwarded 700067 http://code.google.com/p/mtpfs/issues/detail?id=38
thanks

I took the liberty of reporting this bug upstream, including the patch,
and of giving credit here.  Any objections to my doing an NMU?  If I
hear nothing in a few days, I'll go ahead and upload an NMU that
includes this patch.  My diff (-p1) against mtpfs-1.1-4 is attached.  I
have tested this locally, and it fixes the issue for my Samsung Galaxy
S4.  Thanks.

Even with this patch, I find mtpfs to be pretty unstable.  For example,
I am only able to mount my device once using the libmtp from
experimental.  Then I have to reboot (or do something less drastic I
haven't figured out yet), though I don't think this has to do with mtpfs
since mtp-detect also fails after one mount/umount cycle.

-- 
Jay Berkenbilt <q...@debian.org>
diff -Nru mtpfs-1.1/debian/changelog mtpfs-1.1/debian/changelog
--- mtpfs-1.1/debian/changelog	2013-01-17 20:14:06.000000000 -0500
+++ mtpfs-1.1/debian/changelog	2013-06-01 15:20:20.000000000 -0400
@@ -1,3 +1,10 @@
+mtpfs (1.1-4.1) unstable; urgency=low
+
+  * NMU: apply patch from bug 700067 to allow visibility of files in
+    folders with no subfolders.  (Closes: #700067)
+
+ -- Jay Berkenbilt <q...@debian.org>  Sat, 01 Jun 2013 15:18:40 -0400
+
 mtpfs (1.1-4) unstable; urgency=low
 
   * Really depend on fuse now, not fuse-utils. (Closes: #697677)
diff -Nru mtpfs-1.1/debian/patches/02-files-no-folders.diff mtpfs-1.1/debian/patches/02-files-no-folders.diff
--- mtpfs-1.1/debian/patches/02-files-no-folders.diff	1969-12-31 19:00:00.000000000 -0500
+++ mtpfs-1.1/debian/patches/02-files-no-folders.diff	2013-06-01 15:20:20.000000000 -0400
@@ -0,0 +1,18 @@
+Index: mtpfs-1.1/mtpfs.c
+===================================================================
+--- mtpfs-1.1.orig/mtpfs.c	2012-02-26 19:59:39.000000000 -0500
++++ mtpfs-1.1/mtpfs.c	2013-06-01 15:16:38.812060568 -0400
+@@ -725,12 +725,12 @@
+     if (folder_id==-2) {
+         DBG("Root of storage area");
+         folder=storageArea[storageid].folders;
++        if (folder == NULL) return_unlock(0);
+     } else {
+         folder = LIBMTP_Find_Folder (storageArea[storageid].folders, folder_id);
+         if (folder == NULL) return_unlock(0);
+         folder = folder->child;
+     }
+-    if (folder == NULL) return_unlock(0);
+ 
+     while (folder != NULL) {
+         if ((folder->parent_id == folder_id) ||
diff -Nru mtpfs-1.1/debian/patches/series mtpfs-1.1/debian/patches/series
--- mtpfs-1.1/debian/patches/series	2013-01-17 20:14:06.000000000 -0500
+++ mtpfs-1.1/debian/patches/series	2013-06-01 15:20:20.000000000 -0400
@@ -1 +1,2 @@
 01-memory-leak.diff
+02-files-no-folders.diff

Reply via email to