Fossil SCM
Error checking: The argument to the --from option on the "fossil ui" command must be a pathname (not a tag or version hash).
Commit
5c72725ef58387f78a041b27c29a450759767f67f52209d6dae75bc76ad4fde7
Parent
763758db16aec46…
1 file changed
+4
+4
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -3289,10 +3289,14 @@ | ||
| 3289 | 3289 | Th_InitTraceLog(); |
| 3290 | 3290 | zPort = find_option("port", "P", 1); |
| 3291 | 3291 | isUiCmd = g.argv[1][0]=='u'; |
| 3292 | 3292 | if( isUiCmd ){ |
| 3293 | 3293 | zFrom = find_option("from", 0, 1); |
| 3294 | + if( zFrom && zFrom==file_tail(zFrom) ){ | |
| 3295 | + fossil_fatal("the argument to --from must be a pathname for" | |
| 3296 | + " the \"ui\" command"); | |
| 3297 | + } | |
| 3294 | 3298 | zInitPage = find_option("page", "p", 1); |
| 3295 | 3299 | if( zInitPage && zInitPage[0]=='/' ) zInitPage++; |
| 3296 | 3300 | zFossilCmd = find_option("fossilcmd", 0, 1); |
| 3297 | 3301 | if( zFrom && zInitPage==0 ){ |
| 3298 | 3302 | zInitPage = mprintf("ckout?exbase=%T", zFrom); |
| 3299 | 3303 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -3289,10 +3289,14 @@ | |
| 3289 | Th_InitTraceLog(); |
| 3290 | zPort = find_option("port", "P", 1); |
| 3291 | isUiCmd = g.argv[1][0]=='u'; |
| 3292 | if( isUiCmd ){ |
| 3293 | zFrom = find_option("from", 0, 1); |
| 3294 | zInitPage = find_option("page", "p", 1); |
| 3295 | if( zInitPage && zInitPage[0]=='/' ) zInitPage++; |
| 3296 | zFossilCmd = find_option("fossilcmd", 0, 1); |
| 3297 | if( zFrom && zInitPage==0 ){ |
| 3298 | zInitPage = mprintf("ckout?exbase=%T", zFrom); |
| 3299 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -3289,10 +3289,14 @@ | |
| 3289 | Th_InitTraceLog(); |
| 3290 | zPort = find_option("port", "P", 1); |
| 3291 | isUiCmd = g.argv[1][0]=='u'; |
| 3292 | if( isUiCmd ){ |
| 3293 | zFrom = find_option("from", 0, 1); |
| 3294 | if( zFrom && zFrom==file_tail(zFrom) ){ |
| 3295 | fossil_fatal("the argument to --from must be a pathname for" |
| 3296 | " the \"ui\" command"); |
| 3297 | } |
| 3298 | zInitPage = find_option("page", "p", 1); |
| 3299 | if( zInitPage && zInitPage[0]=='/' ) zInitPage++; |
| 3300 | zFossilCmd = find_option("fossilcmd", 0, 1); |
| 3301 | if( zFrom && zInitPage==0 ){ |
| 3302 | zInitPage = mprintf("ckout?exbase=%T", zFrom); |
| 3303 |