Fossil SCM
For the "file info NAME" command, if NAME is directory, give a sensible error message.
Commit
0ee8c8cdecc393b560a5e3146c66b1d683ff1c9811c2ffdd316d96e817448314
Parent
1b114d241ffa496…
1 file changed
+1
+1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -202,10 +202,11 @@ | ||
| 202 | 202 | if( !verboseFlag ){ |
| 203 | 203 | verboseFlag = find_option("detail","l",0)!=0; /* deprecated */ |
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | if( g.argc==3 |
| 207 | + && file_isfile(g.argv[2], ExtFILE) | |
| 207 | 208 | && (fsize = file_size(g.argv[2], ExtFILE))>0 |
| 208 | 209 | && (fsize&0x1ff)==0 |
| 209 | 210 | ){ |
| 210 | 211 | db_open_config(0, 0); |
| 211 | 212 | db_open_repository(g.argv[2]); |
| 212 | 213 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -202,10 +202,11 @@ | |
| 202 | if( !verboseFlag ){ |
| 203 | verboseFlag = find_option("detail","l",0)!=0; /* deprecated */ |
| 204 | } |
| 205 | |
| 206 | if( g.argc==3 |
| 207 | && (fsize = file_size(g.argv[2], ExtFILE))>0 |
| 208 | && (fsize&0x1ff)==0 |
| 209 | ){ |
| 210 | db_open_config(0, 0); |
| 211 | db_open_repository(g.argv[2]); |
| 212 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -202,10 +202,11 @@ | |
| 202 | if( !verboseFlag ){ |
| 203 | verboseFlag = find_option("detail","l",0)!=0; /* deprecated */ |
| 204 | } |
| 205 | |
| 206 | if( g.argc==3 |
| 207 | && file_isfile(g.argv[2], ExtFILE) |
| 208 | && (fsize = file_size(g.argv[2], ExtFILE))>0 |
| 209 | && (fsize&0x1ff)==0 |
| 210 | ){ |
| 211 | db_open_config(0, 0); |
| 212 | db_open_repository(g.argv[2]); |
| 213 |