Commit Graph

6 Commits

Author SHA1 Message Date
Martin Bertschler fbb31b7318 add tests for Readdir, Readdirnames and add check in TestRemove to see if file was removed from the parent file list 2015-10-17 13:00:33 +02:00
Alex Tomlins 6ced24dbe1 Make MemMapFs.Remove() error for non-existent file
So that it's consistent with the os package.
2015-09-08 08:16:57 -04:00
Alex Tomlins a269144fd6 Fix MemMapFs.Remove() to really delete the file.
It was attempting to delete a file with a hardcoded path of "name" as
opposed to the path in the `name` variable.

Fixing this exposed a deadlock because the function was attempting to
acquire an exclusive lock when it already had a read lock.
2015-09-08 08:16:57 -04:00
Jamie Wilkinson d82243906a Test that a read of nonzero bytes from an InMemFile does not return EOF in the same read op. 2015-05-01 17:53:54 -04:00
Anthony Fok 3effba0913 Correct directory permission of testDir
When fs.MkdirAll() was called with a permission of "777" (without the 0 prefix),
it generated the testDir with a permission of `dr----x--x`, causing the following error
during a test run:

    === RUN TestRead0
    --- FAIL: TestRead0 (0.00 seconds)
    	fs_test.go:53: OsFs create failed: open /tmp/fun/test.txt: permission denied

Changing the decimal `777` to octal `0777` fixes the problem.
2014-12-12 13:33:27 -05:00
spf13 0bc61700a3 afero is born 2014-10-28 10:29:28 -04:00