aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Rasmussen2016-02-06 09:46:41 +0100
committerPetter Rasmussen2016-02-06 09:46:41 +0100
commit9b9160c4ed38ac8f1e564fa2dcea0c728af75c6f (patch)
treedc3dd9c8dac52e89b3b7050d22db68fe073bc695
parent0e39bcd0f24f0c3241e39f20388a7f268af03814 (diff)
downloadgdrive-9b9160c4ed38ac8f1e564fa2dcea0c728af75c6f.tar.bz2
Skip files that are not a directory or regular file
-rw-r--r--drive/sync.go5
1 files changed, 5 insertions, 0 deletions
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 {