all repos — litestore @ e2535c431cb985f63b404901cb377d17cc6311aa

A minimalist nosql document store.

On import ignore content of (sub)folders starting with dot
kaminski kaminski@naew.nato.int
Mon, 31 May 2021 22:56:06 +0200
commit

e2535c431cb985f63b404901cb377d17cc6311aa

parent

cd09341dc728f9f2db00991912e0ac1d59a96507

1 files changed, 6 insertions(+), 5 deletions(-)

jump to
M src/litestorepkg/lib/core.nimsrc/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