From 33929c8ad6da71516483573987af6e864e7b10fb Mon Sep 17 00:00:00 2001 From: mawalu Date: Mon, 28 Sep 2026 09:41:41 +0200 Subject: [PATCH] Exclude symlink devices --- lib/utils.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)