lib/model: Refactor out scanning method from rwfolder.Serve loop

This commit is contained in:
Michael Ploujnikov
2016-03-30 06:53:47 +00:00
committed by Jakob Borg
parent 8044522691
commit 66f480519b
3 changed files with 44 additions and 64 deletions

View File

@@ -9,10 +9,8 @@
package integration
import (
"io/ioutil"
"log"
"os"
"path/filepath"
"testing"
"github.com/syncthing/syncthing/lib/config"
@@ -21,16 +19,6 @@ import (
"github.com/syncthing/syncthing/lib/symlinks"
)
func symlinksSupported() bool {
tmp, err := ioutil.TempDir("", "symlink-test")
if err != nil {
return false
}
defer os.RemoveAll(tmp)
err = os.Symlink("tmp", filepath.Join(tmp, "link"))
return err == nil
}
func TestSymlinks(t *testing.T) {
if !symlinksSupported() {
t.Skip("symlinks unsupported")