Skip to content

Commit

Permalink
Finish remove file support from libfetch
Browse files Browse the repository at this point in the history
  • Loading branch information
bapt committed Jan 21, 2022
1 parent dce033e commit af05e14
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions external/libfetch/fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ fetchXGet(struct url *URL, struct url_stat *us, const char *flags)
us->size = -1;
us->atime = us->mtime = 0;
}
if (strcmp(URL->scheme, SCHEME_FILE) == 0)
return (fetchXGetFile(URL, us, flags));
else if (strcmp(URL->scheme, SCHEME_FTP) == 0)
if (strcmp(URL->scheme, SCHEME_FTP) == 0)
return (fetchXGetFTP(URL, us, flags));
else if (strcmp(URL->scheme, SCHEME_HTTP) == 0)
return (fetchXGetHTTP(URL, us, flags));
Expand Down Expand Up @@ -114,9 +112,7 @@ FILE *
fetchPut(struct url *URL, const char *flags)
{

if (strcmp(URL->scheme, SCHEME_FILE) == 0)
return (fetchPutFile(URL, flags));
else if (strcmp(URL->scheme, SCHEME_FTP) == 0)
if (strcmp(URL->scheme, SCHEME_FTP) == 0)
return (fetchPutFTP(URL, flags));
else if (strcmp(URL->scheme, SCHEME_HTTP) == 0)
return (fetchPutHTTP(URL, flags));
Expand All @@ -138,9 +134,7 @@ fetchStat(struct url *URL, struct url_stat *us, const char *flags)
us->size = -1;
us->atime = us->mtime = 0;
}
if (strcmp(URL->scheme, SCHEME_FILE) == 0)
return (fetchStatFile(URL, us, flags));
else if (strcmp(URL->scheme, SCHEME_FTP) == 0)
if (strcmp(URL->scheme, SCHEME_FTP) == 0)
return (fetchStatFTP(URL, us, flags));
else if (strcmp(URL->scheme, SCHEME_HTTP) == 0)
return (fetchStatHTTP(URL, us, flags));
Expand All @@ -158,9 +152,7 @@ struct url_ent *
fetchList(struct url *URL, const char *flags)
{

if (strcmp(URL->scheme, SCHEME_FILE) == 0)
return (fetchListFile(URL, flags));
else if (strcmp(URL->scheme, SCHEME_FTP) == 0)
if (strcmp(URL->scheme, SCHEME_FTP) == 0)
return (fetchListFTP(URL, flags));
else if (strcmp(URL->scheme, SCHEME_HTTP) == 0)
return (fetchListHTTP(URL, flags));
Expand Down

0 comments on commit af05e14

Please sign in to comment.