Преглед изворни кода

lib/model: Do not use WRONLY (ref #2584)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/2994
Audrius Butkevicius пре 9 година
родитељ
комит
4aa6ecb122
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      lib/model/sharedpullerstate.go

+ 2 - 1
lib/model/sharedpullerstate.go

@@ -122,7 +122,8 @@ func (s *sharedPullerState) tempFile() (io.WriterAt, error) {
 	}
 
 	// Attempt to create the temp file
-	flags := os.O_WRONLY
+	// RDWR because of issue #2994.
+	flags := os.O_RDWR
 	if s.reused == 0 {
 		flags |= os.O_CREATE | os.O_EXCL
 	} else {