gerard / ext4fuse

EXT4 implementation for FUSE
GNU General Public License v2.0
913 stars 110 forks source link

'ls' on a non existent path lists all files and directories in parent directory as directories #64

Open phil-blain opened 3 years ago

phil-blain commented 3 years ago

I mount my ext4 partition using ext4fuse and then cd to any folder on the drive. If I do ls non-existent, where non-existent is neither a file nor a directory (it does not exist), all files and folders in the current working directory are shown as directories !

Demo:

$ mount | grep ext4fuse
ext4fuse@osxfuse0 on /Volumes/linux (osxfuse, synchronous)
$ pwd 
/Volumes/linux/home/philippe/code/git/.git
$ ls -l
total 984
-r--r--r--   1 1000  1000   3.9K Dec  5 17:51 EDIT_DESCRIPTION
-r--r--r--   1 1000  1000   3.7K Dec  3 08:41 FETCH_HEAD
-r--r--r--   1 1000  1000    49B Nov 18 09:10 HEAD
dr-xr-xr-x   2 1000  1000   4.0K Nov 18 08:54 branches/
-r--r--r--   1 1000  1000   5.6K Dec  7 13:46 config
-r--r--r--   1 1000  1000    73B Nov 18 08:54 description
dr-xr-xr-x   2 1000  1000   4.0K Nov 18 08:54 hooks/
-r--r--r--   1 1000  1000   357K Nov 21 12:58 index
dr-xr-xr-x   2 1000  1000   4.0K Nov 18 08:54 info/
dr-xr-xr-x   3 1000  1000   4.0K Nov 18 09:05 logs/
dr-xr-xr-x  11 1000  1000   4.0K Dec  7 13:47 objects/
-r--r--r--   1 1000  1000    74K Nov 18 09:05 packed-refs
dr-xr-xr-x   5 1000  1000   4.0K Nov 18 09:05 refs/
dr-xr-xr-x   2 1000  1000   4.0K Nov 25 08:48 rr-cache/
dr-xr-xr-x   4 1000  1000   4.0K Dec  3 08:42 worktrees/
$ ls -l non-existent
total 120
dr-xr-xr-x  10 1000  1000   4.0K Dec 15 19:12 EDIT_DESCRIPTION/
dr-xr-xr-x  10 1000  1000   4.0K Dec 15 19:12 FETCH_HEAD/
dr-xr-xr-x  10 1000  1000   4.0K Dec 15 19:12 HEAD/
dr-xr-xr-x  10 1000  1000   4.0K Dec 15 19:12 branches/
dr-xr-xr-x  10 1000  1000   4.0K Dec 15 19:12 config/
dr-xr-xr-x  10 1000  1000   4.0K Dec 15 19:12 description/
dr-xr-xr-x  10 1000  1000   4.0K Dec 15 19:12 hooks/
dr-xr-xr-x  10 1000  1000   4.0K Dec 15 19:12 index/
dr-xr-xr-x  10 1000  1000   4.0K Dec 15 19:12 info/
dr-xr-xr-x  10 1000  1000   4.0K Dec 15 19:12 logs/
dr-xr-xr-x  10 1000  1000   4.0K Dec 15 19:12 objects/
dr-xr-xr-x  10 1000  1000   4.0K Dec 15 19:12 packed-refs/
dr-xr-xr-x  10 1000  1000   4.0K Dec 15 19:12 refs/
dr-xr-xr-x  10 1000  1000   4.0K Dec 15 19:12 rr-cache/
dr-xr-xr-x  10 1000  1000   4.0K Dec 15 19:12 worktrees/

This behaviour is obviously incorrect and breaks a lot of programs.

erikliu123 commented 3 years ago

have you fixed that bug?

worldpoop commented 2 years ago

One of those programs is DCP-O-Matic. Any Mac user who tries to load a SMPTE industry compliant DCP with DCP-O-Matic Player is stopped by this bug. Me being one of them. I can't use ext4fuse -- I have to run a whole Ubuntu Virtual machine just to network in a DCP for playback. FYI & cheereo - b