diff options
| author | apnadkarni <apnmbx-wits@yahoo.com> | 2024-07-29 08:08:11 (GMT) |
|---|---|---|
| committer | apnadkarni <apnmbx-wits@yahoo.com> | 2024-07-29 08:08:11 (GMT) |
| commit | a3926e812ec454d7796e303694b7e80cdf55b738 (patch) | |
| tree | 7683bbf2941055b6af1a5b9b97732a87b550ad24 | |
| parent | 46c7acb6251b5bfb6c463c3de469eb498d4e676c (diff) | |
| download | tcl-a3926e812ec454d7796e303694b7e80cdf55b738.zip tcl-a3926e812ec454d7796e303694b7e80cdf55b738.tar.gz tcl-a3926e812ec454d7796e303694b7e80cdf55b738.tar.bz2 | |
Fix [7d5f1c1308] - zipfs mkzip error on Windows dotfiles
| -rw-r--r-- | generic/tclZipfs.c | 4 | ||||
| -rw-r--r-- | tests/zipfs.test | 15 |
2 files changed, 18 insertions, 1 deletions
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index 52ff689..2eb90a5 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -6237,7 +6237,9 @@ TclZipfs_Init( "namespace eval ::tcl::zipfs {}\n" "proc ::tcl::zipfs::Find dir {\n" " set result {}\n" - " if {[catch {glob -directory $dir -nocomplain * .*} list]} {\n" + " if {[catch {\n" + " concat [glob -directory $dir -nocomplain *] [glob -directory $dir -types hidden -nocomplain *]\n" + " } list]} {\n" " return $result\n" " }\n" " foreach file $list {\n" diff --git a/tests/zipfs.test b/tests/zipfs.test index b696308..9571d36 100644 --- a/tests/zipfs.test +++ b/tests/zipfs.test @@ -1940,6 +1940,21 @@ namespace eval test_ns_zipfs { after 100; # Needed to allow the spawned thread to exit to trigger bug string equal $before [lsort [zipfs mount]] } -result 1 + + test bug-7d5f1c1308 "zipfs error on dotfiles" -setup { + set basename bug-7d5f1c1308 + set mt //zipfs:/$basename-mt + set zipfile $basename.zip + set dir [tcltest::makeDirectory $basename] + close [open [file join $dir .ext] w] + } -cleanup { + zipfs unmount $mt + file delete $zipfile + } -body { + zipfs mkzip $zipfile $dir [file dirname $dir] + zipfs mount $zipfile $mt + lsort [zipfs list $mt/*] + } -result {//zipfs:/bug-7d5f1c1308-mt/bug-7d5f1c1308 //zipfs:/bug-7d5f1c1308-mt/bug-7d5f1c1308/.ext} } |
