Commit Graph

274 Commits

Author SHA1 Message Date
Michail Kargakis 238028b461
Merge pull request #250 from anishathalye/improve-mode
Improve handling of mode bits
2020-08-02 15:26:12 +02:00
Anish Athalye b598fbbf55 Improve handling of mode bits
- "/" should have mode `os.ModeDir|0755`, not `0000`. Among other
  things, this had resulted in `mode.IsDir()` returning false for root
  prior to this patch.
- `Mkdir`, `MkdirAll`, and `OpenFile` shouldn't be allowed to set
  permissions that are otherwise illegal through `Chmod`. This mirrors
  what Go's `os` package does: it calls `syscallMode(mode)`, which
  effectively clears out the same bits that are disallowed by `Chmod`.
- `MkdirAll` should use the given permissions for all intermediate
  directories that are created, not just for the final directory. Prior
  to this patch, intermediate directories were created with mode bits
  `0000`. Besides the permission bits being wrong, `mode.IsDir()` would
  return false for these directories prior to this patch.
2020-07-15 15:43:42 -04:00
Michail Kargakis 5d9e780691
Merge pull request #249 from JohnStarich/bugfix/memfs-chmod-perm-only
Prevent MemMapFs.Chmod from changing all mode bits
2020-07-13 19:39:06 +02:00
John Starich d443df9ff3 Fix test for Windows 2020-07-11 20:57:46 -05:00
John Starich 57ab25aed5 Use more appropriate func name for unrestricted mode changes 2020-07-11 20:42:35 -05:00
John Starich 7b70cb1dbc Fix MemMapFs.Chmod changing non-perm bits 2020-07-11 18:32:33 -05:00
Michail Kargakis 64b7ddd95f
Merge pull request #247 from JohnStarich/bugfix/zipfs-read-small-file
Fix panic when not filling up zipfs's read buffer
2020-06-28 19:14:13 +02:00
John Starich e76d1f3bb5 Fix panic when not filling up zipfs's read buffer 2020-06-25 23:27:17 -05:00
John Starich fc99a5d786 Add failing test for reading a small zip file 2020-06-25 23:25:49 -05:00
Michail Kargakis 1524d0a48b
Merge pull request #245 from campoy/master
Add support for os.O_EXCL in afero.MemMapFs
2020-05-31 15:38:23 +02:00
Francesc Campoy 0b856b1ea9 Add support for os.O_EXCL in afero.MemMapFs 2020-05-29 13:21:39 -07:00
Michail Kargakis a7dc6ae3c5
Merge pull request #228 from Maldris/symlink
Add optional interfaces for Symlink and Readlink
2020-05-20 23:32:33 +02:00
Scott Owens 02af70d733 adding tests for Linker and ReadLinker interfaces 2020-05-20 23:00:48 +10:00
Scott Owens b4b149f834 adding support for Linker and LinkReader 2020-05-20 23:00:47 +10:00
Scott Owens 819f7ad35d Adding and optional Symlinker interface,
union interface supportint lstat, symlink and readlink
2020-05-20 23:00:47 +10:00
Scott Owens 529d861398 Add an optional interface for Sylink and Readlink 2020-05-20 23:00:47 +10:00
Michail Kargakis c8608266df
Merge pull request #243 from ialidzhikov/nit/line-endings
Change CRLF line endings to LF
2020-05-04 19:23:17 +02:00
Michail Kargakis 38a8ffc10d
Merge pull request #241 from dmitris/patch-1
fix typo
2020-05-04 19:22:28 +02:00
ialidzhikov 7aa0da4f47 Change CRLF line endings to LF
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2020-05-03 14:03:17 +03:00
Michail Kargakis c17d293300
Merge pull request #242 from robinbraemer/patch-1
Add missing error check in RegexpFs Open
2020-04-21 15:58:42 +02:00
Robin Brämer 70f98daaf3
Add missing error check in RegexpFs Open 2020-04-18 19:14:24 +02:00
Dmitry Savintsev 2f8d9cb33e
fix typo 2020-04-17 18:02:40 +02:00
Michail Kargakis a2fefa4cb9
Merge pull request #240 from cugu/patch-1
Fix zipfs.Readdir and zipfs.Readdirnames
2020-04-14 23:39:02 +02:00
Jonas Plum 5fd16ea9f1
Fix zipfs.Readdir and zipfs.Readdirnames
If count == 0 all files should be returned as of https://golang.org/pkg/os/#File.Readdir
2020-04-14 22:36:17 +02:00
Michail Kargakis ceb6a5e372
Merge pull request #158 from kklin/sftp-openfile
sftpfs: Implement OpenFile method
2020-04-11 00:22:21 +02:00
Michail Kargakis 02a77d47d0
Merge pull request #192 from saromanov/fix-match
match: change strings.IndexAny to strings.ContainsAny
2020-04-11 00:18:31 +02:00
Michail Kargakis 2c061eb5bc
Merge pull request #238 from kargakis/gofmt
Run gofmt and go vet in CI
2020-04-11 00:11:29 +02:00
Michail Kargakis 90f4ffe95f
Gofmt the project 2020-04-10 23:59:22 +02:00
Michail Kargakis d66a0674ca
Add gofmt and go vet checks in CI 2020-04-10 23:59:21 +02:00
Michail Kargakis 900cf72eec
Merge pull request #167 from jslching/master
Return closed error in mem.File.Write() after Close()
2020-04-10 23:44:32 +02:00
Michail Kargakis 55428b400d
Merge pull request #146 from hillu/zipfs
Add zipfs, an archive/zip-based read-only filesystem
2020-04-10 23:21:50 +02:00
Hilko Bengen 344ad9d197 Don't hide errors while reading from ZIP files 2020-03-30 15:45:29 +02:00
Hilko Bengen 9b520d0821 Use filepath.Separator in test code, to fix tests on Windows 2020-03-30 14:44:04 +02:00
Hilko Bengen 72cabd552e Eliminate another root-path-related corner case 2020-03-30 14:44:04 +02:00
Hilko Bengen d5bfeca89b Work around root directory Open/Stat corner case leading to panic
See https://github.com/spf13/afero/pull/146#issuecomment-470840725
2020-03-30 14:44:04 +02:00
Hilko Bengen 4f00b06400 Add zipfs, an archive/zip-based read-only filesystem 2020-03-30 14:44:04 +02:00
Michail Kargakis f1155579b0
Merge pull request #236 from kargakis/travis-update
Build and test CI improvements
2020-03-28 14:30:46 +01:00
Michail Kargakis 72d3215259
Build and test CI improvements 2020-03-28 14:01:49 +01:00
Michail Kargakis 6c364fcc86
Merge pull request #229 from ichekrygin/wild-temp-file
Add Support for WildCard in  TempFile Name Prefix
2020-03-27 22:02:37 +01:00
Michail Kargakis ff1b22491c
Merge pull request #157 from xor-gate/sftpfs-fix-test
sftpfs: Fix test with latest API of the sftp package
2020-03-27 21:49:32 +01:00
Michail Kargakis 491ff289da
Merge pull request #223 from whereswaldon/patch-1
Remove stale release notes from README
2020-03-27 21:46:00 +01:00
Michail Kargakis cc3719f211
Merge pull request #182 from btc/btc/0002
add ReadAt/Seek test
2020-03-27 21:43:44 +01:00
Michail Kargakis de012fc5f2
Merge pull request #187 from yasoob/patch-1
Fixed a small typo
2020-03-27 21:30:35 +01:00
Michail Kargakis 00285cd3a3
Merge pull request #155 from rwaweber/readme_grammar
fix grammar typos in readme
2020-03-27 21:29:24 +01:00
Michail Kargakis ac701bd5ba
Merge pull request #210 from Helflym/aix
Add AIX support
2020-03-27 20:18:39 +01:00
Illya Chekrygin e016ffbd1f
Add implementation for TempFile with wild card prefix
Signed-off-by: Illya Chekrygin <illya.chekrygin@gmail.com>
2020-01-06 22:31:16 -08:00
Christopher Waldon 338097a104
Remove stale release notes from README
New users coming to the project could incorrectly assume that the project is pre-1.0 release and that it hasn't had a release in years if they assumed that the release notes in the README were up-to-date. I say this because I assumed that on my first read.
2019-11-03 14:44:18 -05:00
Clément Chigot 4e0df35705 Add AIX support 2019-07-04 15:58:10 +02:00
Cameron Moore 588a75ec4f Fix UnionFile.Readdir return when c <= 0
Update Readdir to match behavior of stdlib os package.

Fixes #197
2019-03-26 13:07:55 +01:00
Bjørn Erik Pedersen f4711e4db9 Fix missing bounds checking in UnionFile.Readdir
It will now return io.EOF at the end of the directory view.

Fixes #194
2019-01-30 09:29:40 +01:00