Fossil SCM
Correct repository option handling so that specifying a directory name does not cause errors when TH1 hooks are enabled.
Commit
36c4551e7cda231c0b5fe99600afc75c10eba2c7
Parent
9c2a5c097b7718f…
1 file changed
+3
M
src/db.c
+3
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -1069,10 +1069,13 @@ | ||
| 1069 | 1069 | ** |
| 1070 | 1070 | ** Error out if the repository cannot be opened. |
| 1071 | 1071 | */ |
| 1072 | 1072 | void db_find_and_open_repository(int bFlags, int nArgUsed){ |
| 1073 | 1073 | const char *zRep = find_repository_option(); |
| 1074 | + if( zRep && file_isdir(zRep)==1 ){ | |
| 1075 | + goto rep_not_found; | |
| 1076 | + } | |
| 1074 | 1077 | if( zRep==0 && nArgUsed && g.argc==nArgUsed+1 ){ |
| 1075 | 1078 | zRep = g.argv[nArgUsed]; |
| 1076 | 1079 | } |
| 1077 | 1080 | if( zRep==0 ){ |
| 1078 | 1081 | if( db_open_local(0)==0 ){ |
| 1079 | 1082 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1069,10 +1069,13 @@ | |
| 1069 | ** |
| 1070 | ** Error out if the repository cannot be opened. |
| 1071 | */ |
| 1072 | void db_find_and_open_repository(int bFlags, int nArgUsed){ |
| 1073 | const char *zRep = find_repository_option(); |
| 1074 | if( zRep==0 && nArgUsed && g.argc==nArgUsed+1 ){ |
| 1075 | zRep = g.argv[nArgUsed]; |
| 1076 | } |
| 1077 | if( zRep==0 ){ |
| 1078 | if( db_open_local(0)==0 ){ |
| 1079 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1069,10 +1069,13 @@ | |
| 1069 | ** |
| 1070 | ** Error out if the repository cannot be opened. |
| 1071 | */ |
| 1072 | void db_find_and_open_repository(int bFlags, int nArgUsed){ |
| 1073 | const char *zRep = find_repository_option(); |
| 1074 | if( zRep && file_isdir(zRep)==1 ){ |
| 1075 | goto rep_not_found; |
| 1076 | } |
| 1077 | if( zRep==0 && nArgUsed && g.argc==nArgUsed+1 ){ |
| 1078 | zRep = g.argv[nArgUsed]; |
| 1079 | } |
| 1080 | if( zRep==0 ){ |
| 1081 | if( db_open_local(0)==0 ){ |
| 1082 |