diff options
| author | Petter Rasmussen | 2016-02-06 09:46:41 +0100 | 
|---|---|---|
| committer | Petter Rasmussen | 2016-02-06 09:46:41 +0100 | 
| commit | 9b9160c4ed38ac8f1e564fa2dcea0c728af75c6f (patch) | |
| tree | dc3dd9c8dac52e89b3b7050d22db68fe073bc695 /drive/sync.go | |
| parent | 0e39bcd0f24f0c3241e39f20388a7f268af03814 (diff) | |
| download | gdrive-9b9160c4ed38ac8f1e564fa2dcea0c728af75c6f.tar.bz2 | |
Skip files that are not a directory or regular file
Diffstat (limited to 'drive/sync.go')
| -rw-r--r-- | drive/sync.go | 5 | 
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 { | 
