aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Rasmussen2016-02-03 21:41:28 +0100
committerPetter Rasmussen2016-02-03 21:41:28 +0100
commitf43248e57561cff30111340e19543acc76148685 (patch)
treed172b4220839ca948270b5a7de9142e1e2bdd40f
parenta8c5402742a2c3c1b79febda5dac3897bc98ba6b (diff)
downloadgdrive-f43248e57561cff30111340e19543acc76148685.tar.bz2
Comments
-rw-r--r--drive/sync.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/drive/sync.go b/drive/sync.go
index 7b6c344..7b039e2 100644
--- a/drive/sync.go
+++ b/drive/sync.go
@@ -51,7 +51,7 @@ func prepareLocalFiles(root string) ([]*localFile, error) {
return nil, err
}
- // Skip file if it is ignored by ignore file
+ // Prepare ignorer
shouldIgnore, err := prepareIgnorer(filepath.Join(absRootPath, DefaultIgnoreFile))
if err != nil {
return nil, err
@@ -67,11 +67,13 @@ func prepareLocalFiles(root string) ([]*localFile, error) {
return nil
}
+ // Get relative path from root
relPath, err := filepath.Rel(absRootPath, absPath)
if err != nil {
return err
}
+ // Skip file if it is ignored by ignore file
if shouldIgnore(relPath) {
return nil
}