Fossil SCM
Fix a crash if the test-file-environment command is called from outside a check-out.
Commit
3bb9cbe8cc1fdf834c05277c33350c76dab637668ab5c3db8ee5767cb918f413
Parent
3c6e5a1e4cf6e71…
1 file changed
+1
-1
+1
-1
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -1641,11 +1641,11 @@ | ||
| 1641 | 1641 | fossil_print("filenames_are_case_sensitive() = %d\n", |
| 1642 | 1642 | filenames_are_case_sensitive()); |
| 1643 | 1643 | if( zAllow ){ |
| 1644 | 1644 | g.allowSymlinks = !is_false(zAllow); |
| 1645 | 1645 | } |
| 1646 | - if( zRoot==0 ) zRoot = g.zLocalRoot; | |
| 1646 | + if( zRoot==0 ) zRoot = g.zLocalRoot==0 ? "" : g.zLocalRoot; | |
| 1647 | 1647 | fossil_print("db_allow_symlinks() = %d\n", db_allow_symlinks()); |
| 1648 | 1648 | fossil_print("local-root = [%s]\n", zRoot); |
| 1649 | 1649 | for(i=2; i<g.argc; i++){ |
| 1650 | 1650 | char *z; |
| 1651 | 1651 | emitFileStat(g.argv[i], slashFlag, resetFlag); |
| 1652 | 1652 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -1641,11 +1641,11 @@ | |
| 1641 | fossil_print("filenames_are_case_sensitive() = %d\n", |
| 1642 | filenames_are_case_sensitive()); |
| 1643 | if( zAllow ){ |
| 1644 | g.allowSymlinks = !is_false(zAllow); |
| 1645 | } |
| 1646 | if( zRoot==0 ) zRoot = g.zLocalRoot; |
| 1647 | fossil_print("db_allow_symlinks() = %d\n", db_allow_symlinks()); |
| 1648 | fossil_print("local-root = [%s]\n", zRoot); |
| 1649 | for(i=2; i<g.argc; i++){ |
| 1650 | char *z; |
| 1651 | emitFileStat(g.argv[i], slashFlag, resetFlag); |
| 1652 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -1641,11 +1641,11 @@ | |
| 1641 | fossil_print("filenames_are_case_sensitive() = %d\n", |
| 1642 | filenames_are_case_sensitive()); |
| 1643 | if( zAllow ){ |
| 1644 | g.allowSymlinks = !is_false(zAllow); |
| 1645 | } |
| 1646 | if( zRoot==0 ) zRoot = g.zLocalRoot==0 ? "" : g.zLocalRoot; |
| 1647 | fossil_print("db_allow_symlinks() = %d\n", db_allow_symlinks()); |
| 1648 | fossil_print("local-root = [%s]\n", zRoot); |
| 1649 | for(i=2; i<g.argc; i++){ |
| 1650 | char *z; |
| 1651 | emitFileStat(g.argv[i], slashFlag, resetFlag); |
| 1652 |