From d9e84ea5dd929a0fd9dd9ebe8b7b8b44b8907e99 Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Sun, 15 Mar 2026 23:09:00 +1100 Subject: [PATCH] punk::nav::fs fix --- src/bootsupport/modules/punk/nav/fs-0.1.0.tm | 4 ++-- src/bootsupport/modules/punk/winlnk-0.1.1.tm | 2 ++ src/modules/punk/nav/fs-999999.0a1.0.tm | 4 ++-- src/modules/punk/winlnk-999999.0a1.0.tm | 2 ++ .../src/bootsupport/modules/punk/nav/fs-0.1.0.tm | 4 ++-- .../src/bootsupport/modules/punk/winlnk-0.1.1.tm | 2 ++ .../src/bootsupport/modules/punk/nav/fs-0.1.0.tm | 4 ++-- .../src/bootsupport/modules/punk/winlnk-0.1.1.tm | 2 ++ src/vfs/_vfscommon.vfs/modules/punk/nav/fs-0.1.0.tm | 4 ++-- src/vfs/_vfscommon.vfs/modules/punk/winlnk-0.1.1.tm | 2 ++ 10 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/bootsupport/modules/punk/nav/fs-0.1.0.tm b/src/bootsupport/modules/punk/nav/fs-0.1.0.tm index 741d9fc0..e767e366 100644 --- a/src/bootsupport/modules/punk/nav/fs-0.1.0.tm +++ b/src/bootsupport/modules/punk/nav/fs-0.1.0.tm @@ -482,7 +482,7 @@ tcl::namespace::eval punk::nav::fs { } else { set stripbase 1 } - set out [dirfiles_dict_as_lines -stripbase $stripbase $matchinfo] + set out [dirfiles_dict_as_lines -listing $v -stripbase $stripbase $matchinfo] #lappend chunklist [list stdout "[punk::ansi::a+ brightwhite]$out[punk::ansi::a]\n"] if {$result ne ""} { @@ -549,7 +549,7 @@ tcl::namespace::eval punk::nav::fs { lappend result filebytes [punk::lib::format_number $filebytes] } - set out [dirfiles_dict_as_lines -stripbase 1 $matchinfo] + set out [dirfiles_dict_as_lines -listing / -stripbase 1 $matchinfo] #return $out\n[pwd] set chunklist [list] lappend chunklist [list stdout "[punk::ansi::a+ brightwhite]$out[punk::ansi::a]\n"] diff --git a/src/bootsupport/modules/punk/winlnk-0.1.1.tm b/src/bootsupport/modules/punk/winlnk-0.1.1.tm index f3a25272..00f45d44 100644 --- a/src/bootsupport/modules/punk/winlnk-0.1.1.tm +++ b/src/bootsupport/modules/punk/winlnk-0.1.1.tm @@ -676,6 +676,8 @@ tcl::namespace::eval punk::winlnk { if {"windows" eq $::tcl_platform(platform)} { set link_target [file join $localbase_path $suffix_path] } else { + #review - calling mount and parsing its output every time we parse a .lnk file makes this slow on large folders with .lnk files + # - we may want to cache the results of mount for some period of time or until we detect a change in the system's mounts (e.g. by monitoring /proc/mounts for changes or using a filesystem watcher on /mnt) set suffix_path [string trimleft [string map {\\ /} $suffix_path] /] if {[regexp {([a-zA-Z]):\\(.*)} $localbase_path _match drive_letter tail]} { set localbase_path [string map {\\ /} $localbase_path] diff --git a/src/modules/punk/nav/fs-999999.0a1.0.tm b/src/modules/punk/nav/fs-999999.0a1.0.tm index eb4026e9..1b73917d 100644 --- a/src/modules/punk/nav/fs-999999.0a1.0.tm +++ b/src/modules/punk/nav/fs-999999.0a1.0.tm @@ -482,7 +482,7 @@ tcl::namespace::eval punk::nav::fs { } else { set stripbase 1 } - set out [dirfiles_dict_as_lines -stripbase $stripbase $matchinfo] + set out [dirfiles_dict_as_lines -listing $v -stripbase $stripbase $matchinfo] #lappend chunklist [list stdout "[punk::ansi::a+ brightwhite]$out[punk::ansi::a]\n"] if {$result ne ""} { @@ -549,7 +549,7 @@ tcl::namespace::eval punk::nav::fs { lappend result filebytes [punk::lib::format_number $filebytes] } - set out [dirfiles_dict_as_lines -stripbase 1 $matchinfo] + set out [dirfiles_dict_as_lines -listing / -stripbase 1 $matchinfo] #return $out\n[pwd] set chunklist [list] lappend chunklist [list stdout "[punk::ansi::a+ brightwhite]$out[punk::ansi::a]\n"] diff --git a/src/modules/punk/winlnk-999999.0a1.0.tm b/src/modules/punk/winlnk-999999.0a1.0.tm index 862b0476..c87ed734 100644 --- a/src/modules/punk/winlnk-999999.0a1.0.tm +++ b/src/modules/punk/winlnk-999999.0a1.0.tm @@ -676,6 +676,8 @@ tcl::namespace::eval punk::winlnk { if {"windows" eq $::tcl_platform(platform)} { set link_target [file join $localbase_path $suffix_path] } else { + #review - calling mount and parsing its output every time we parse a .lnk file makes this slow on large folders with .lnk files + # - we may want to cache the results of mount for some period of time or until we detect a change in the system's mounts (e.g. by monitoring /proc/mounts for changes or using a filesystem watcher on /mnt) set suffix_path [string trimleft [string map {\\ /} $suffix_path] /] if {[regexp {([a-zA-Z]):\\(.*)} $localbase_path _match drive_letter tail]} { set localbase_path [string map {\\ /} $localbase_path] diff --git a/src/project_layouts/custom/_project/punk.project-0.1/src/bootsupport/modules/punk/nav/fs-0.1.0.tm b/src/project_layouts/custom/_project/punk.project-0.1/src/bootsupport/modules/punk/nav/fs-0.1.0.tm index 741d9fc0..e767e366 100644 --- a/src/project_layouts/custom/_project/punk.project-0.1/src/bootsupport/modules/punk/nav/fs-0.1.0.tm +++ b/src/project_layouts/custom/_project/punk.project-0.1/src/bootsupport/modules/punk/nav/fs-0.1.0.tm @@ -482,7 +482,7 @@ tcl::namespace::eval punk::nav::fs { } else { set stripbase 1 } - set out [dirfiles_dict_as_lines -stripbase $stripbase $matchinfo] + set out [dirfiles_dict_as_lines -listing $v -stripbase $stripbase $matchinfo] #lappend chunklist [list stdout "[punk::ansi::a+ brightwhite]$out[punk::ansi::a]\n"] if {$result ne ""} { @@ -549,7 +549,7 @@ tcl::namespace::eval punk::nav::fs { lappend result filebytes [punk::lib::format_number $filebytes] } - set out [dirfiles_dict_as_lines -stripbase 1 $matchinfo] + set out [dirfiles_dict_as_lines -listing / -stripbase 1 $matchinfo] #return $out\n[pwd] set chunklist [list] lappend chunklist [list stdout "[punk::ansi::a+ brightwhite]$out[punk::ansi::a]\n"] diff --git a/src/project_layouts/custom/_project/punk.project-0.1/src/bootsupport/modules/punk/winlnk-0.1.1.tm b/src/project_layouts/custom/_project/punk.project-0.1/src/bootsupport/modules/punk/winlnk-0.1.1.tm index f3a25272..00f45d44 100644 --- a/src/project_layouts/custom/_project/punk.project-0.1/src/bootsupport/modules/punk/winlnk-0.1.1.tm +++ b/src/project_layouts/custom/_project/punk.project-0.1/src/bootsupport/modules/punk/winlnk-0.1.1.tm @@ -676,6 +676,8 @@ tcl::namespace::eval punk::winlnk { if {"windows" eq $::tcl_platform(platform)} { set link_target [file join $localbase_path $suffix_path] } else { + #review - calling mount and parsing its output every time we parse a .lnk file makes this slow on large folders with .lnk files + # - we may want to cache the results of mount for some period of time or until we detect a change in the system's mounts (e.g. by monitoring /proc/mounts for changes or using a filesystem watcher on /mnt) set suffix_path [string trimleft [string map {\\ /} $suffix_path] /] if {[regexp {([a-zA-Z]):\\(.*)} $localbase_path _match drive_letter tail]} { set localbase_path [string map {\\ /} $localbase_path] diff --git a/src/project_layouts/custom/_project/punk.shell-0.1/src/bootsupport/modules/punk/nav/fs-0.1.0.tm b/src/project_layouts/custom/_project/punk.shell-0.1/src/bootsupport/modules/punk/nav/fs-0.1.0.tm index 741d9fc0..e767e366 100644 --- a/src/project_layouts/custom/_project/punk.shell-0.1/src/bootsupport/modules/punk/nav/fs-0.1.0.tm +++ b/src/project_layouts/custom/_project/punk.shell-0.1/src/bootsupport/modules/punk/nav/fs-0.1.0.tm @@ -482,7 +482,7 @@ tcl::namespace::eval punk::nav::fs { } else { set stripbase 1 } - set out [dirfiles_dict_as_lines -stripbase $stripbase $matchinfo] + set out [dirfiles_dict_as_lines -listing $v -stripbase $stripbase $matchinfo] #lappend chunklist [list stdout "[punk::ansi::a+ brightwhite]$out[punk::ansi::a]\n"] if {$result ne ""} { @@ -549,7 +549,7 @@ tcl::namespace::eval punk::nav::fs { lappend result filebytes [punk::lib::format_number $filebytes] } - set out [dirfiles_dict_as_lines -stripbase 1 $matchinfo] + set out [dirfiles_dict_as_lines -listing / -stripbase 1 $matchinfo] #return $out\n[pwd] set chunklist [list] lappend chunklist [list stdout "[punk::ansi::a+ brightwhite]$out[punk::ansi::a]\n"] diff --git a/src/project_layouts/custom/_project/punk.shell-0.1/src/bootsupport/modules/punk/winlnk-0.1.1.tm b/src/project_layouts/custom/_project/punk.shell-0.1/src/bootsupport/modules/punk/winlnk-0.1.1.tm index f3a25272..00f45d44 100644 --- a/src/project_layouts/custom/_project/punk.shell-0.1/src/bootsupport/modules/punk/winlnk-0.1.1.tm +++ b/src/project_layouts/custom/_project/punk.shell-0.1/src/bootsupport/modules/punk/winlnk-0.1.1.tm @@ -676,6 +676,8 @@ tcl::namespace::eval punk::winlnk { if {"windows" eq $::tcl_platform(platform)} { set link_target [file join $localbase_path $suffix_path] } else { + #review - calling mount and parsing its output every time we parse a .lnk file makes this slow on large folders with .lnk files + # - we may want to cache the results of mount for some period of time or until we detect a change in the system's mounts (e.g. by monitoring /proc/mounts for changes or using a filesystem watcher on /mnt) set suffix_path [string trimleft [string map {\\ /} $suffix_path] /] if {[regexp {([a-zA-Z]):\\(.*)} $localbase_path _match drive_letter tail]} { set localbase_path [string map {\\ /} $localbase_path] diff --git a/src/vfs/_vfscommon.vfs/modules/punk/nav/fs-0.1.0.tm b/src/vfs/_vfscommon.vfs/modules/punk/nav/fs-0.1.0.tm index 741d9fc0..e767e366 100644 --- a/src/vfs/_vfscommon.vfs/modules/punk/nav/fs-0.1.0.tm +++ b/src/vfs/_vfscommon.vfs/modules/punk/nav/fs-0.1.0.tm @@ -482,7 +482,7 @@ tcl::namespace::eval punk::nav::fs { } else { set stripbase 1 } - set out [dirfiles_dict_as_lines -stripbase $stripbase $matchinfo] + set out [dirfiles_dict_as_lines -listing $v -stripbase $stripbase $matchinfo] #lappend chunklist [list stdout "[punk::ansi::a+ brightwhite]$out[punk::ansi::a]\n"] if {$result ne ""} { @@ -549,7 +549,7 @@ tcl::namespace::eval punk::nav::fs { lappend result filebytes [punk::lib::format_number $filebytes] } - set out [dirfiles_dict_as_lines -stripbase 1 $matchinfo] + set out [dirfiles_dict_as_lines -listing / -stripbase 1 $matchinfo] #return $out\n[pwd] set chunklist [list] lappend chunklist [list stdout "[punk::ansi::a+ brightwhite]$out[punk::ansi::a]\n"] diff --git a/src/vfs/_vfscommon.vfs/modules/punk/winlnk-0.1.1.tm b/src/vfs/_vfscommon.vfs/modules/punk/winlnk-0.1.1.tm index f3a25272..00f45d44 100644 --- a/src/vfs/_vfscommon.vfs/modules/punk/winlnk-0.1.1.tm +++ b/src/vfs/_vfscommon.vfs/modules/punk/winlnk-0.1.1.tm @@ -676,6 +676,8 @@ tcl::namespace::eval punk::winlnk { if {"windows" eq $::tcl_platform(platform)} { set link_target [file join $localbase_path $suffix_path] } else { + #review - calling mount and parsing its output every time we parse a .lnk file makes this slow on large folders with .lnk files + # - we may want to cache the results of mount for some period of time or until we detect a change in the system's mounts (e.g. by monitoring /proc/mounts for changes or using a filesystem watcher on /mnt) set suffix_path [string trimleft [string map {\\ /} $suffix_path] /] if {[regexp {([a-zA-Z]):\\(.*)} $localbase_path _match drive_letter tail]} { set localbase_path [string map {\\ /} $localbase_path]