mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-05 16:12:20 +00:00
Change permissions of newly created files and directories (fixes #1339)
This commit is contained in:
parent
c51d3e59ea
commit
badfc77339
@ -541,7 +541,7 @@ func (p *rwFolder) handleDir(file protocol.FileInfo) {
|
|||||||
realName := filepath.Join(p.dir, file.Name)
|
realName := filepath.Join(p.dir, file.Name)
|
||||||
mode := os.FileMode(file.Flags & 0777)
|
mode := os.FileMode(file.Flags & 0777)
|
||||||
if p.ignorePerms {
|
if p.ignorePerms {
|
||||||
mode = 0755
|
mode = 0777
|
||||||
}
|
}
|
||||||
|
|
||||||
if debug {
|
if debug {
|
||||||
|
@ -115,7 +115,7 @@ func (s *sharedPullerState) tempFile() (io.WriterAt, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fd, err := os.OpenFile(s.tempName, flags, 0644)
|
fd, err := os.OpenFile(s.tempName, flags, 0666)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
s.failLocked("dst create", err)
|
s.failLocked("dst create", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user