lib: Remove osutil.Remove & osutil.RemoveAll (fixes #3513)

These are no longer required with Go 1.7. Change made by removing the
functions, doing a global s/osutil.Remove/os.Remove/.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3514
This commit is contained in:
Jakob Borg
2016-08-16 10:01:58 +00:00
committed by Audrius Butkevicius
parent cf5febad47
commit 18cc7a663b
10 changed files with 64 additions and 123 deletions

View File

@@ -144,7 +144,7 @@ func (t *Trashcan) cleanoutArchive() error {
// directory was empty and try to remove it. We ignore failure for
// the time being.
if currentDir != "" && filesInDir == 0 {
osutil.Remove(currentDir)
os.Remove(currentDir)
}
currentDir = path
filesInDir = 0
@@ -153,7 +153,7 @@ func (t *Trashcan) cleanoutArchive() error {
if info.ModTime().Before(cutoff) {
// The file is too old; remove it.
osutil.Remove(path)
os.Remove(path)
} else {
// Keep this file, and remember it so we don't unnecessarily try
// to remove this directory.
@@ -169,7 +169,7 @@ func (t *Trashcan) cleanoutArchive() error {
// The last directory seen by the walkFn may not have been removed as it
// should be.
if currentDir != "" && filesInDir == 0 {
osutil.Remove(currentDir)
os.Remove(currentDir)
}
return nil
}