Changes On Branch 27bac5b2c692775e
Not logged in

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

Changes In Branch bug-f9fe90d0fa Excluding Merge-Ins

This is equivalent to a diff from e895b53905 to 27bac5b2c6

2017-04-29
14:41
Make trunk compile on MSVC (problem was: warning C4554: '&' : check operator precedence for possible... check-in: d701ee871e user: fvogel tags: trunk
11:04
[f9fe90d0fa]: more path normalization in TclNewFSPathObj Leaf check-in: 27bac5b2c6 user: aspect tags: bug-f9fe90d0fa
2017-04-28
17:57
[f34cf83dd0] An optimization was being taken in a case where it produced the wrong result, failing t... check-in: e895b53905 user: dgp tags: trunk
17:52
[f34cf83dd0] An optimization was being taken in a case where it produced the wrong result, failing t... check-in: e015bfe72f user: dgp tags: core-8-6-branch
17:46
Test for [f34cf83dd0]. check-in: 769ae9c349 user: dgp tags: trunk

Changes to generic/tclPathObj.c.
1273
1274
1275
1276
1277
1278
1279









1280
1281
1282
1283
1284
1285
1286
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295







+
+
+
+
+
+
+
+
+







    const char *addStrRep,
    int len)
{
    FsPath *fsPathPtr;
    Tcl_Obj *pathPtr;
    const char *p;
    int state = 0, count = 0;

    /* if dirPtr is already tclFsPathType, its string representation
     * may not be canonical.  Try to use its normPathPtr in this case.
     */
    if (   (dirPtr->typePtr == &tclFsPathType)
	&& (PATHOBJ(dirPtr)->cwdPtr == NULL) 
	&& (PATHOBJ(dirPtr)->normPathPtr != NULL)  ) {
	dirPtr = PATHOBJ(dirPtr)->normPathPtr;
    }

    /* [Bug 2806250] - this is only a partial solution of the problem.
     * The PATHFLAGS != 0 representation assumes in many places that
     * the "tail" part stored in the normPathPtr field is itself a
     * relative path.  Strings that begin with "~" are not relative paths,
     * so we must prevent their storage in the normPathPtr field.
     *
Changes to tests/fileSystem.test.
363
364
365
366
367
368
369










370
371
372
373
374
375
376
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386







+
+
+
+
+
+
+
+
+
+







} ok
test filesystem-1.51 {file normalisation .. beyond root (Bug 1379287)} {
    testPathEqual [file norm /../..] [file norm /]
} ok
test filesystem-1.51.1 {file normalisation .. beyond root (Bug 1379287)} {
    testPathEqual [file norm /../../] [file norm /]
} ok
test filesystem-1.52 {bug f9f390d0fa: file join where strep is not canonical} -body {
    set x //foo
    file normalize $x
    file join $x bar
} -result /foo/bar
test filesystem-1.52.1 {bug f9f390d0fa: file join where strep is not canonical} -body {
    set x //foo
    file normalize $x
    file join $x
} -result /foo

test filesystem-2.0 {new native path} {unix} {
   foreach f [lsort [glob -nocomplain /usr/bin/c*]] {
       catch {file readlink $f}
   }
   # If we reach here we've succeeded. We used to crash above.
   return ok