From 9b9160c4ed38ac8f1e564fa2dcea0c728af75c6f Mon Sep 17 00:00:00 2001 From: Petter Rasmussen Date: Sat, 6 Feb 2016 09:46:41 +0100 Subject: Skip files that are not a directory or regular file --- drive/sync.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drive') diff --git a/drive/sync.go b/drive/sync.go index a0d90a2..c8396c1 100644 --- a/drive/sync.go +++ b/drive/sync.go @@ -69,6 +69,11 @@ func prepareLocalFiles(root string) ([]*localFile, error) { return nil } + // Skip files that are not a directory or regular file + if !info.IsDir() && !info.Mode().IsRegular() { + return nil + } + // Get relative path from root relPath, err := filepath.Rel(absRootPath, absPath) if err != nil { -- cgit v1.2.3