cjd/mtpfs

No reported errors, but most directories are blank

Closed this issue · 1 comments

I have a Fairphone 3, running vanilla Android 10. I tried to mount it on my gentoo system. USB debugging is enabled. I followed the usage instructions here: https://wiki.gentoo.org/wiki/MTPfs

$ mtpfs ~/AndroidDevice/
Listing raw device(s)
Device 0 (VID=18d1 and PID=4ee2) is a Google Inc Nexus/Pixel (MTP+ADB).
   Found 1 device(s):
   Google Inc: Nexus/Pixel (MTP+ADB) (18d1:4ee2) @ bus 2, dev 32
Attempting to connect device
Android device detected, assigning default bug flags

Listing File Information on Device with name: (NULL)

All the directories appear, but most are blank:

$ ls ~/AndroidDevice/Internal\ shared\ storage/
Alarms  Android  DCIM  Download  Movies  Music  Musicolet  Notifications  Pictures  Podcasts  Ringtones  TWRP  WhatsApp
daniel@gentoo:~
$ ls ~/AndroidDevice/Internal\ shared\ storage/DCIM/Camera/
# no output, but there are definitely files here
$ ls ~/AndroidDevice/Internal\ shared\ storage/Download/
 0f63f9_7876b8c5d43d4713a46fb3d5bb853e64.pdf   freeculture.pdf
'1178993 (1).jpg'                             1178993.jpg
Camera
daniel@gentoo:~
$ ls ~/AndroidDevice/Internal\ shared\ storage/Download/Camera/
# again, no output, despite files existing on the device

Raised PR #25 to fix. Current code returns from mtpfs_readdir after looking for the folder when no subfolder found.