Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

Commit

Permalink
Use os.Open for reads
Browse files Browse the repository at this point in the history
  • Loading branch information
DaneEveritt committed Jan 24, 2019
1 parent c0b0028 commit defecf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (fs FileSystem) Fileread(request *sftp.Request) (io.ReaderAt, error) {
return nil, sftp.ErrSshFxNoSuchFile
}

file, err := os.OpenFile(p, os.O_RDONLY, 0644)
file, err := os.Open(p)
if err != nil {
logger.Get().Errorw("could not open file for reading", zap.String("source", p), zap.Error(err))
return nil, sftp.ErrSshFxFailure
Expand Down

0 comments on commit defecf8

Please sign in to comment.