lib/model: Refactor out scanning method from rwfolder.Serve loop
This commit is contained in:
committed by
Jakob Borg
parent
8044522691
commit
66f480519b
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user