Exclude symlink devices
This commit is contained in:
+1
-1
@@ -39,7 +39,7 @@ proc getSandboxPath*(name: string): string =
|
|||||||
|
|
||||||
proc deviceExists(path: string): bool =
|
proc deviceExists(path: string): bool =
|
||||||
var res: Stat
|
var res: Stat
|
||||||
return stat(path, res) >= 0 and S_ISCHR(res.st_mode)
|
return stat(path, res) >= 0 and S_ISCHR(res.st_mode) and getFileInfo(path, false).kind == pcFile
|
||||||
|
|
||||||
proc mountDriFolder(call: var BwrapCall, path: string) =
|
proc mountDriFolder(call: var BwrapCall, path: string) =
|
||||||
for file in walkPattern(&"{path}/*"):
|
for file in walkPattern(&"{path}/*"):
|
||||||
|
|||||||
Reference in New Issue
Block a user