all: Revert the underscore sillyness
This commit is contained in:
@@ -1016,7 +1016,7 @@ func (f *sendReceiveFolder) handleFile(file protocol.FileInfo, copyChan chan<- c
|
||||
// Otherwise, discard the file ourselves in order for the
|
||||
// sharedpuller not to panic when it fails to exclusively create a
|
||||
// file which already exists
|
||||
_ = osutil.InWritableDir(f.fs.Remove, f.fs, tempName)
|
||||
osutil.InWritableDir(f.fs.Remove, f.fs, tempName)
|
||||
}
|
||||
} else {
|
||||
// Copy the blocks, as we don't want to shuffle them on the FileInfo
|
||||
@@ -1142,7 +1142,7 @@ func (f *sendReceiveFolder) shortcutFile(file, curFile protocol.FileInfo, dbUpda
|
||||
}
|
||||
}
|
||||
|
||||
_ = f.fs.Chtimes(file.Name, file.ModTime(), file.ModTime()) // never fails
|
||||
f.fs.Chtimes(file.Name, file.ModTime(), file.ModTime()) // never fails
|
||||
|
||||
// This may have been a conflict. We should merge the version vectors so
|
||||
// that our clock doesn't move backwards.
|
||||
@@ -1536,7 +1536,7 @@ func (f *sendReceiveFolder) performFinish(ignores *ignore.Matcher, file, curFile
|
||||
}
|
||||
|
||||
// Set the correct timestamp on the new file
|
||||
_ = f.fs.Chtimes(file.Name, file.ModTime(), file.ModTime()) // never fails
|
||||
f.fs.Chtimes(file.Name, file.ModTime(), file.ModTime()) // never fails
|
||||
|
||||
// Record the updated file in the index
|
||||
dbUpdateChan <- dbUpdateJob{file, dbUpdateHandleFile}
|
||||
@@ -1706,7 +1706,7 @@ func (f *sendReceiveFolder) pullScannerRoutine(scanChan <-chan string) {
|
||||
l.Debugln(f, "scheduling scan after pulling for", path)
|
||||
scanList = append(scanList, path)
|
||||
}
|
||||
_ = f.Scan(scanList)
|
||||
f.Scan(scanList)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1858,7 +1858,7 @@ func (f *sendReceiveFolder) deleteDir(dir string, ignores *ignore.Matcher, scanC
|
||||
}
|
||||
|
||||
for _, del := range toBeDeleted {
|
||||
_ = f.fs.RemoveAll(del)
|
||||
f.fs.RemoveAll(del)
|
||||
}
|
||||
|
||||
err := osutil.InWritableDir(f.fs.Remove, f.fs, dir)
|
||||
|
||||
@@ -258,9 +258,9 @@ func (m *Model) startFolderLocked(folder string) config.FolderType {
|
||||
ffs := fs.MtimeFS()
|
||||
|
||||
// These are our metadata files, and they should always be hidden.
|
||||
_ = ffs.Hide(config.DefaultMarkerName)
|
||||
_ = ffs.Hide(".stversions")
|
||||
_ = ffs.Hide(".stignore")
|
||||
ffs.Hide(config.DefaultMarkerName)
|
||||
ffs.Hide(".stversions")
|
||||
ffs.Hide(".stignore")
|
||||
|
||||
p := folderFactory(m, cfg, ver, ffs)
|
||||
|
||||
@@ -338,7 +338,7 @@ func (m *Model) RemoveFolder(cfg config.FolderConfiguration) {
|
||||
m.fmut.Lock()
|
||||
m.pmut.Lock()
|
||||
// Delete syncthing specific files
|
||||
_ = cfg.Filesystem().RemoveAll(config.DefaultMarkerName)
|
||||
cfg.Filesystem().RemoveAll(config.DefaultMarkerName)
|
||||
|
||||
m.tearDownFolderLocked(cfg, fmt.Errorf("removing folder %v", cfg.Description()))
|
||||
// Remove it from the database
|
||||
@@ -362,7 +362,7 @@ func (m *Model) tearDownFolderLocked(cfg config.FolderConfiguration, err error)
|
||||
m.pmut.Unlock()
|
||||
m.fmut.Unlock()
|
||||
for _, id := range tokens {
|
||||
_ = m.RemoveAndWait(id, 0)
|
||||
m.RemoveAndWait(id, 0)
|
||||
}
|
||||
m.fmut.Lock()
|
||||
m.pmut.Lock()
|
||||
@@ -1185,7 +1185,7 @@ func (m *Model) handleIntroductions(introducerCfg config.DeviceConfiguration, cm
|
||||
}
|
||||
|
||||
if changed {
|
||||
_, _ = m.cfg.SetFolder(fcfg)
|
||||
m.cfg.SetFolder(fcfg)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1242,7 +1242,7 @@ func (m *Model) handleDeintroductions(introducerCfg config.DeviceConfiguration,
|
||||
cfg := m.cfg.RawCopy()
|
||||
cfg.Folders = folders
|
||||
cfg.Devices = devices
|
||||
_, _ = m.cfg.Replace(cfg)
|
||||
m.cfg.Replace(cfg)
|
||||
}
|
||||
|
||||
return changed
|
||||
@@ -1321,7 +1321,7 @@ func (m *Model) introduceDevice(device protocol.Device, introducerCfg config.Dev
|
||||
newDeviceCfg.SkipIntroductionRemovals = device.SkipIntroductionRemovals
|
||||
}
|
||||
|
||||
_, _ = m.cfg.SetDevice(newDeviceCfg)
|
||||
m.cfg.SetDevice(newDeviceCfg)
|
||||
}
|
||||
|
||||
// Closed is called when a connection has been closed
|
||||
@@ -1772,8 +1772,8 @@ func (m *Model) AddConnection(conn connections.Connection, hello protocol.HelloR
|
||||
|
||||
if (device.Name == "" || m.cfg.Options().OverwriteRemoteDevNames) && hello.DeviceName != "" {
|
||||
device.Name = hello.DeviceName
|
||||
_, _ = m.cfg.SetDevice(device)
|
||||
_ = m.cfg.Save()
|
||||
m.cfg.SetDevice(device)
|
||||
m.cfg.Save()
|
||||
}
|
||||
|
||||
m.deviceWasSeen(deviceID)
|
||||
@@ -1860,7 +1860,7 @@ func sendIndexes(conn protocol.Connection, folder string, fs *db.FileSet, ignore
|
||||
// local index may update for other folders than the one we are
|
||||
// sending for.
|
||||
if fs.Sequence(protocol.LocalDeviceID) <= prevSequence {
|
||||
_, _ = sub.Poll(time.Minute)
|
||||
sub.Poll(time.Minute)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -2485,7 +2485,7 @@ func (m *Model) RestoreFolderVersions(folder string, versions map[string]time.Ti
|
||||
}
|
||||
}
|
||||
|
||||
_ = filesystem.MkdirAll(filepath.Dir(target), 0755)
|
||||
filesystem.MkdirAll(filepath.Dir(target), 0755)
|
||||
if err == nil {
|
||||
err = osutil.Copy(filesystem, source, target)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user