mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-07 10:20:29 +00:00
Enable using symlinked directories with redbean -A flag
This commit is contained in:
parent
b7f7c3b9d7
commit
f4cd70a9ff
1 changed files with 2 additions and 1 deletions
|
@ -3526,7 +3526,8 @@ static void StorePath(const char *dirpath) {
|
||||||
DIR *d;
|
DIR *d;
|
||||||
char *path;
|
char *path;
|
||||||
struct dirent *e;
|
struct dirent *e;
|
||||||
if (!isdirectory(dirpath)) return StoreFile(dirpath);
|
if (!isdirectory(dirpath) && !endswith(dirpath, "/"))
|
||||||
|
return StoreFile(dirpath);
|
||||||
if (!(d = opendir(dirpath))) DIEF("Can't open %`'s", dirpath);
|
if (!(d = opendir(dirpath))) DIEF("Can't open %`'s", dirpath);
|
||||||
while ((e = readdir(d))) {
|
while ((e = readdir(d))) {
|
||||||
if (strcmp(e->d_name, ".") == 0) continue;
|
if (strcmp(e->d_name, ".") == 0) continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue