fix: ignore files in TSM_DIRS

This commit is contained in:
Daylin Morgan 2023-10-01 15:09:50 -05:00
parent f8d6363390
commit b6065f0ef5
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F

View file

@ -28,8 +28,9 @@ proc findProjects*(open: bool = false): seq[Project] =
# TODO: only return directories
for devDir in tsmDirs.split(":"):
for d in walkDir(devDir):
let p = newProject(d.path, tmux.sessions)
for path in walkDir(devDir):
if path.kind == pcFile or path.kind == pcLinkToFile: continue
let p = newProject(path.path, tmux.sessions)
if open:
if p.open: result.add p
else: