diff --git a/lib/utils.nim b/lib/utils.nim index 0633f7c..9437f79 100644 --- a/lib/utils.nim +++ b/lib/utils.nim @@ -39,7 +39,7 @@ proc getSandboxPath*(name: string): string = proc deviceExists(path: string): bool = 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) = for file in walkPattern(&"{path}/*"): @@ -71,4 +71,4 @@ proc enableDri*(call: var BwrapCall) = let device = &"/dev/nvidia{i}" if deviceExists(device): - call.addMount("--dev-bind", device) \ No newline at end of file + call.addMount("--dev-bind", device)