Sample Header Ad - 728x90

Can't list folder on USB connected drive but it's there!

1 vote
0 answers
82 views
When I run
ls /run/user/1000/gvfs/mtp:host=OPPO_SM6375-QRD__SN%3AD5F9F680_d5f9f680/
The following is returned
'Internal shared storage' 'SD card'
When I run
ls /run/user/1000/gvfs/mtp:host=OPPO_SM6375-QRD__SN%3AD5F9F680_d5f9f680/SD\ card/
ls /run/user/1000/gvfs/mtp:host=OPPO_SM6375-QRD__SN%3AD5F9F680_d5f9f680/Internal\ shared\ storage/
I get the message **"No such file or directory"**. I used to hit TAB to complete the path but it stops after
ls /run/user/1000/gvfs/mtp:host=OPPO_SM6375-QRD__SN%3AD5F9F680_d5f9f680/
If I run
ls /run/user/1000/gvfs/mtp:host=OPPO_SM6375-QRD__SN%3AD5F9F680_d5f9f680/*
the following is returned:
'/run/user/1000/gvfs/mtp:host=OPPO_SM6375-QRD__SN%3AD5F9F680_d5f9f680/Internal shared storage':
Alarms	Audiobooks  Documents	Movies	Notifications	Pictures  Recordings  temp
Android  DCIM	    Download	Music	oua_classifier	Podcasts  Ringtones

'/run/user/1000/gvfs/mtp:host=OPPO_SM6375-QRD__SN%3AD5F9F680_d5f9f680/SD card':
Alarms	Audiobooks  DCIM	Download  Music		Pictures  Recordings
Android  data	    Documents	Movies	 Notifications  Podcasts  Ringtones
So the two directories (Internal shared drive and SD card) are not empty. This used to work until a few days ago. There have been Linux Mint updates but no phone update. I have a second phone with two similar directories and everything works on that phone when connected. In the file explorer, nemo, I can navigate the directories. However, there is an oddity, which didn't exist when all was working. If I press the toolbar button *Toggle Location Entry*, the following appears. For 'Internal shared storage':
mtp://OPPO_SM6375-QRD__SN%3AD5F9F680_d5f9f680/%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8EInternal%20shared%20storage%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E
For 'SD card':
mtp://OPPO_SM6375-QRD__SN%3AD5F9F680_d5f9f680/%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8ESD%20card%E2%80%8E%E2%80%8F%E2%80%8E%E2%80%8E%E2%80%8F%E2%80%8E
When I saw the above, I tried putting the path in quotes:
ls "/run/user/1000/gvfs/mtp:host=OPPO_SM6375-QRD__SN%3AD5F9F680_d5f9f680/"
Then when I hit TAB after final forward slash, the two long folder names above (with all the %E%80, etc) were shown and the directories were listed! This is made worse because I have a Python script that takes the full paths to the two directories as input (Internal shared storage and SD card) but now when trying to recurse them, the script fails. It doesn't see the directories. Again, this used to be fine. Please can someone shed light on this and tell me what I've done to get into this state! inxi output:
CPU: dual core Intel Core i7-6500U (-MT MCP-) speed/min/max: 700/400/3100 MHz
Kernel: 6.2.6-060206-generic x86_64 Up: 20h 34m
Mem: 7048.4/15765.9 MiB (44.7%) Storage: 1.38 TiB (48.5% used) Procs: 347
Shell: Zsh inxi: 3.3.13
I tried updating the kernel (as seen above) to 6.x instead of the default 5.x for Linux Mint but both exhibit the same behaviour. I also updated zsh to the latest version, 5.9.
Asked by Praful (11 rep)
Jun 6, 2023, 12:20 PM
Last activity: Jun 6, 2023, 02:55 PM