diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-11-20 12:25:10 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-11-20 12:25:10 +0100 |
commit | 32c610c0000b7af5c85e69306853636a77f2168b (patch) | |
tree | 04f552cc2776fda80a938c9e1a69a5f8a403e6f6 /utils/fs/memory | |
parent | 2e60c554dbe56eed3e9a503d03fed01b459d029a (diff) | |
download | go-git-32c610c0000b7af5c85e69306853636a77f2168b.tar.gz |
utils: fs, memory fix read offset
Diffstat (limited to 'utils/fs/memory')
-rw-r--r-- | utils/fs/memory/memory.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/fs/memory/memory.go b/utils/fs/memory/memory.go index 398ac35..54dd497 100644 --- a/utils/fs/memory/memory.go +++ b/utils/fs/memory/memory.go @@ -40,6 +40,7 @@ func (fs *Memory) Open(filename string) (fs.File, error) { func (fs *Memory) OpenFile(filename string, flag int, perm os.FileMode) (fs.File, error) { fullpath := fs.Join(fs.base, filename) f, ok := fs.s.files[fullpath] + if !ok && !isCreate(flag) { return nil, os.ErrNotExist } @@ -194,7 +195,6 @@ func (f *file) Read(b []byte) (int, error) { return 0, err } - f.position += int64(n) return n, err } |