On import ignore content of (sub)folders starting with dot
kaminski kaminski@naew.nato.int
Mon, 31 May 2021 22:56:06 +0200
1 files changed,
6 insertions(+),
5 deletions(-)
jump to
M
src/litestorepkg/lib/core.nim
→
src/litestorepkg/lib/core.nim
@@ -1,13 +1,13 @@
import x_sqlite3, x_db_sqlite as db, - strutils, os, oids, json, pegs, strtabs, strutils, + sequtils, base64, math import@@ -590,10 +590,11 @@ raise newException(EDirectoryNotFound, "Directory '$1' not found." % dir)
for f in dir.walkDirRec(): if f.dirExists: continue - let fileName = f.splitFile.name - if fileName.startsWith("."): - # Ignore hidden files - continue + let dirs = f.split(DirSep) + if dirs.any(proc (s: string): bool = return s.startsWith(".")): + # Ignore hidden directories and files + continue + let fileName = f.splitFile.name if fileName == "_tags" and not importTags: # Ignore tags file unless the CLI flag was set continue