Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"No such file or directory" errors when listing a directory #30

Closed
jacobsa opened this issue Mar 31, 2015 · 0 comments
Closed

"No such file or directory" errors when listing a directory #30

jacobsa opened this issue Mar 31, 2015 · 0 comments
Assignees
Milestone

Comments

@jacobsa
Copy link
Contributor

jacobsa commented Mar 31, 2015

As mentioned at the end of #28, there are problems with ls -l on an empty directory:

jacobsa@jacobsa-macpro:~/tmp% ls -l mp/
total 0
drwx------  1 jacobsa  eng  0 Aug 31  1754 foo
-rwx------  1 jacobsa  eng  0 Mar 31 16:28 foo?


jacobsa@jacobsa-macpro:~/tmp% ls -l mp/foo/
ls: foo: No such file or directory


jacobsa@jacobsa-macpro:~/tmp% ls -l mp/foo/
ls: foo: No such file or directory

I believe this is because this code doesn't filter out itself from the prefix-based results returned from GCS. The equivalent code used to, but must have regressed at some point during refactoring.

The reason this isn't reproduced in the integration tests is that ioutil.ReadDir ignores ENOENT when statting the names it reads from the directory, silently filtering out such entries.

So, update the integration tests to use a pickier version of ioutil.ReadDir, then fix the bug.

@jacobsa jacobsa self-assigned this Mar 31, 2015
@jacobsa jacobsa added this to the beta milestone Mar 31, 2015
jacobsa added a commit to jacobsa/fuse that referenced this issue Mar 31, 2015
jacobsa added a commit that referenced this issue Mar 31, 2015
jacobsa added a commit that referenced this issue Mar 31, 2015
FakeGCS.ForeignModsTest.UnreachableObjects still fails, apparently for a
different reason.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant