Skip to content

Mac: stat reports "No such file or directory" if a file\folder's parent has not yet been enumerated #249

@wilbaker

Description

@wilbaker

To reproduce:

  1. gvfs clone\mount the ForTests repo
  2. Attempt to stat a file\folder whose parent has not been enumerated

Example:

~/Repos/VFSForGit/src>stat /Users/wilbaker/GVFSTest/src/Scripts/StartDevService.bat
stat: /Users/wilbaker/GVFSTest/src/Scripts/StartDevService.bat: stat: No such file or directory
~/Repos/VFSForGit/src>stat /Users/wilbaker/GVFSTest/src/Scripts
stat: /Users/wilbaker/GVFSTest/src/Scripts: stat: No such file or directory
~/Repos/VFSForGit/src>stat /Users/wilbaker/GVFSTest/src/
16777220 15754195 drwxr-xr-x 16 wilbaker staff 0 512 "Sep  6 14:24:19 2018" "Sep  6 14:25:04 2018" "Sep  6 14:25:04 2018" "Sep  6 14:24:19 2018" 4194304 0 0x8 /Users/wilbaker/GVFSTest/src/
~/Repos/VFSForGit/src>stat /Users/wilbaker/GVFSTest/src/Scripts
16777220 15754577 drwxr-xr-x 5 wilbaker staff 0 160 "Sep  6 14:25:04 2018" "Sep  6 14:25:08 2018" "Sep  6 14:25:08 2018" "Sep  6 14:25:04 2018" 4194304 0 0x8 /Users/wilbaker/GVFSTest/src/Scripts
~/Repos/VFSForGit/src>stat /Users/wilbaker/GVFSTest/src/Scripts/StartDevService.bat
16777220 15754580 -rw-r--r-- 1 wilbaker staff 0 164 "Sep  6 14:25:08 2018" "Sep  6 14:33:10 2018" "Sep  6 14:33:10 2018" "Sep  6 14:25:08 2018" 4194304 8 0x8 /Users/wilbaker/GVFSTest/src/Scripts/StartDevService.bat
~/Repos/VFSForGit/src>

Note that a stat on the parent itself appears to trigger an expansion of the parent folder.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions