File 02-files-no-folders.diff of Package mtpfs
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) ||