exclude windows from protected dirs checking
This commit is contained in:
parent
a045aa4ef1
commit
bb387650ab
|
@ -22,7 +22,11 @@ const
|
|||
# we're forbidding this dirs from being
|
||||
# touched directly, but subdirectories
|
||||
# can still be touched/created
|
||||
ProtectedPaths* = [
|
||||
ProtectedPaths* =
|
||||
when doslikeFileSystem:
|
||||
[]
|
||||
else:
|
||||
[
|
||||
"/",
|
||||
"/usr",
|
||||
"/etc",
|
||||
|
@ -50,7 +54,6 @@ template path*(self: FSDatastore, key: Key): string =
|
|||
self.root / segments.joinPath()
|
||||
|
||||
template checkProtected*(path: string): bool =
|
||||
echo "PATH ", path
|
||||
path in ProtectedPaths
|
||||
|
||||
template validDepth*(self: FSDatastore, key: Key): bool =
|
||||
|
|
Loading…
Reference in New Issue