all repos — litestore @ 04ead6258b82e0841ea844b4fce20f72b085ee05

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

04ead6258b82e0841ea844b4fce20f72b085ee05

parent

69cf8ec7e60c2ec83c5f14ef1be1393edeb3306d

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