Tcl Source Code

Check-in [66fe3ce72b]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:fix [glob] handling of leading //
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core_zip_vfs-aspect | core_zip_vfs-8-6
Files: files | file ages | folders
SHA3-256: 66fe3ce72b04dde03598cd7363a4b2fd55f93217c027b9cbafad8bd983b40100
User & Date: aspect 2017-11-17 11:53:19
Context
2017-11-17
12:39
Pulling changes from core-zip-vfs Closed-Leaf check-in: 79dde51515 user: hypnotoad tags: core_zip_vfs-aspect, core_zip_vfs-8-6
11:53
fix [glob] handling of leading // check-in: 66fe3ce72b user: aspect tags: core_zip_vfs-aspect, core_zip_vfs-8-6
10:24
clean up stray unused dstrings check-in: c30d1e6bb0 user: aspect tags: core_zip_vfs-aspect, core_zip_vfs-8-6
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclFileName.c.

1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
	 * ':' no longer needed as a separator. It is only relevant to the
	 * beginning of the path.
	 */

	separators = "/\\";

    } else if (tclPlatform == TCL_PLATFORM_UNIX) {
	if (pathPrefix == NULL && tail[0] == '/') {
	    pathPrefix = Tcl_NewStringObj(tail, 1);
	    tail++;
	    Tcl_IncrRefCount(pathPrefix);
	}
    }

    /*






|







1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
	 * ':' no longer needed as a separator. It is only relevant to the
	 * beginning of the path.
	 */

	separators = "/\\";

    } else if (tclPlatform == TCL_PLATFORM_UNIX) {
	if (pathPrefix == NULL && tail[0] == '/' && tail[1] != '/') {
	    pathPrefix = Tcl_NewStringObj(tail, 1);
	    tail++;
	    Tcl_IncrRefCount(pathPrefix);
	}
    }

    /*

Changes to tests/zipfs.test.

51
52
53
54
55
56
57
58
59
60
61
62
63
64
65




66
67
68
69
70
71
72
} -result [list $tcl_library/http $tcl_library/http1.0]

test zipfs-0.5 {zipfs basics: glob} -constraints zipfs -body {
    lsort [glob -dir $tcl_library http*]
} -result [list $tcl_library/http $tcl_library/http1.0]

test zipfs-0.6 {zipfs basics: glob} -constraints zipfs -body {
    lsort [glob -tails -dir $tcl_library http*]
} -result {http http1.0}

test zipfs-0.7 {zipfs basics: glob} -constraints zipfs -body {
    lsort [glob -nocomplain -tails -types d -dir $tcl_library http*]
} -result {http http1.0}

test zipfs-0.8 {zipfs basics: glob} -constraints zipfs -body {




    lsort [glob -nocomplain -tails -types f -dir $tcl_library http*]
} -result {}


test zipfs-1.3 {zipfs errors} -constraints zipfs -returnCodes error -body {
    zipfs mount a b c d e f
} -result {wrong # args: should be "zipfs mount ?zipfile? ?mountpoint? ?password?"}






|
|


|



>
>
>
>







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
} -result [list $tcl_library/http $tcl_library/http1.0]

test zipfs-0.5 {zipfs basics: glob} -constraints zipfs -body {
    lsort [glob -dir $tcl_library http*]
} -result [list $tcl_library/http $tcl_library/http1.0]

test zipfs-0.6 {zipfs basics: glob} -constraints zipfs -body {
    lsort [glob $tcl_library/http*]
} -result [list $tcl_library/http $tcl_library/http1.0]

test zipfs-0.7 {zipfs basics: glob} -constraints zipfs -body {
    lsort [glob -tails -dir $tcl_library http*]
} -result {http http1.0}

test zipfs-0.8 {zipfs basics: glob} -constraints zipfs -body {
    lsort [glob -nocomplain -tails -types d -dir $tcl_library http*]
} -result {http http1.0}

test zipfs-0.9 {zipfs basics: glob} -constraints zipfs -body {
    lsort [glob -nocomplain -tails -types f -dir $tcl_library http*]
} -result {}


test zipfs-1.3 {zipfs errors} -constraints zipfs -returnCodes error -body {
    zipfs mount a b c d e f
} -result {wrong # args: should be "zipfs mount ?zipfile? ?mountpoint? ?password?"}