Fossil SCM

Fix a crash if the test-file-environment command is called from outside a check-out (introduced with [106de276ee]).

florian 2024-11-26 05:16 trunk
Commit 38930fbabe9b35ad97ab7c5c7fdb6931334f62781922c46e02909fb50a0a0476
1 file changed +1
+1
--- src/file.c
+++ src/file.c
@@ -1656,10 +1656,11 @@
16561656
g.allowSymlinks = !is_false(zAllow);
16571657
}
16581658
if( zRoot==0 ) zRoot = g.zLocalRoot==0 ? "" : g.zLocalRoot;
16591659
fossil_print("db_allow_symlinks() = %d\n", db_allow_symlinks());
16601660
fossil_print("local-root = [%s]\n", zRoot);
1661
+ if( g.db==0 ) sqlite3_open(":memory:", &g.db);
16611662
sqlite3_create_function(g.db, "inode", 1, SQLITE_UTF8, 0,
16621663
file_inode_sql_func, 0, 0);
16631664
for(i=2; i<g.argc; i++){
16641665
char *z;
16651666
emitFileStat(g.argv[i], slashFlag, resetFlag);
16661667
--- src/file.c
+++ src/file.c
@@ -1656,10 +1656,11 @@
1656 g.allowSymlinks = !is_false(zAllow);
1657 }
1658 if( zRoot==0 ) zRoot = g.zLocalRoot==0 ? "" : g.zLocalRoot;
1659 fossil_print("db_allow_symlinks() = %d\n", db_allow_symlinks());
1660 fossil_print("local-root = [%s]\n", zRoot);
 
1661 sqlite3_create_function(g.db, "inode", 1, SQLITE_UTF8, 0,
1662 file_inode_sql_func, 0, 0);
1663 for(i=2; i<g.argc; i++){
1664 char *z;
1665 emitFileStat(g.argv[i], slashFlag, resetFlag);
1666
--- src/file.c
+++ src/file.c
@@ -1656,10 +1656,11 @@
1656 g.allowSymlinks = !is_false(zAllow);
1657 }
1658 if( zRoot==0 ) zRoot = g.zLocalRoot==0 ? "" : g.zLocalRoot;
1659 fossil_print("db_allow_symlinks() = %d\n", db_allow_symlinks());
1660 fossil_print("local-root = [%s]\n", zRoot);
1661 if( g.db==0 ) sqlite3_open(":memory:", &g.db);
1662 sqlite3_create_function(g.db, "inode", 1, SQLITE_UTF8, 0,
1663 file_inode_sql_func, 0, 0);
1664 for(i=2; i<g.argc; i++){
1665 char *z;
1666 emitFileStat(g.argv[i], slashFlag, resetFlag);
1667

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button