Fossil SCM
Report an error if the input file to "fossil import" cannot be opened.
Commit
038dcc00e5ead3af8416cb5d16f6535ac9671bf030db963300089b851dc068da
Parent
0f8bae079ef92ca…
1 file changed
+1
+1
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -1735,10 +1735,11 @@ | ||
| 1735 | 1735 | if( g.argc!=3 && g.argc!=4 ){ |
| 1736 | 1736 | usage("--git|--svn ?OPTIONS? NEW-REPOSITORY ?INPUT-FILE?"); |
| 1737 | 1737 | } |
| 1738 | 1738 | if( g.argc==4 ){ |
| 1739 | 1739 | pIn = fossil_fopen(g.argv[3], "rb"); |
| 1740 | + if( pIn==0 ) fossil_fatal("cannot open input file \"%s\"", g.argv[3]); | |
| 1740 | 1741 | }else{ |
| 1741 | 1742 | pIn = stdin; |
| 1742 | 1743 | fossil_binary_mode(pIn); |
| 1743 | 1744 | } |
| 1744 | 1745 | if( !incrFlag ){ |
| 1745 | 1746 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -1735,10 +1735,11 @@ | |
| 1735 | if( g.argc!=3 && g.argc!=4 ){ |
| 1736 | usage("--git|--svn ?OPTIONS? NEW-REPOSITORY ?INPUT-FILE?"); |
| 1737 | } |
| 1738 | if( g.argc==4 ){ |
| 1739 | pIn = fossil_fopen(g.argv[3], "rb"); |
| 1740 | }else{ |
| 1741 | pIn = stdin; |
| 1742 | fossil_binary_mode(pIn); |
| 1743 | } |
| 1744 | if( !incrFlag ){ |
| 1745 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -1735,10 +1735,11 @@ | |
| 1735 | if( g.argc!=3 && g.argc!=4 ){ |
| 1736 | usage("--git|--svn ?OPTIONS? NEW-REPOSITORY ?INPUT-FILE?"); |
| 1737 | } |
| 1738 | if( g.argc==4 ){ |
| 1739 | pIn = fossil_fopen(g.argv[3], "rb"); |
| 1740 | if( pIn==0 ) fossil_fatal("cannot open input file \"%s\"", g.argv[3]); |
| 1741 | }else{ |
| 1742 | pIn = stdin; |
| 1743 | fossil_binary_mode(pIn); |
| 1744 | } |
| 1745 | if( !incrFlag ){ |
| 1746 |