Fossil SCM
The file_wd_isdir() function must honor the symlinks options.
Commit
de053c778cb822713e06be897adabab13cf75dd5
Parent
35e37e9ba8160f9…
1 file changed
+1
-1
+1
-1
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -309,11 +309,11 @@ | ||
| 309 | 309 | rc = getStat(zFN, 1); |
| 310 | 310 | if( rc ){ |
| 311 | 311 | rc = 0; /* It does not exist at all. */ |
| 312 | 312 | }else if( S_ISDIR(fileStat.st_mode) ){ |
| 313 | 313 | rc = 1; /* It exists and is a real directory. */ |
| 314 | - }else if( S_ISLNK(fileStat.st_mode) ){ | |
| 314 | + }else if( db_allow_symlinks() && S_ISLNK(fileStat.st_mode) ){ | |
| 315 | 315 | Blob content; |
| 316 | 316 | blob_read_link(&content, zFN); /* It exists and is a link. */ |
| 317 | 317 | rc = file_wd_isdir(blob_str(&content)); /* Points to directory? */ |
| 318 | 318 | blob_reset(&content); |
| 319 | 319 | }else{ |
| 320 | 320 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -309,11 +309,11 @@ | |
| 309 | rc = getStat(zFN, 1); |
| 310 | if( rc ){ |
| 311 | rc = 0; /* It does not exist at all. */ |
| 312 | }else if( S_ISDIR(fileStat.st_mode) ){ |
| 313 | rc = 1; /* It exists and is a real directory. */ |
| 314 | }else if( S_ISLNK(fileStat.st_mode) ){ |
| 315 | Blob content; |
| 316 | blob_read_link(&content, zFN); /* It exists and is a link. */ |
| 317 | rc = file_wd_isdir(blob_str(&content)); /* Points to directory? */ |
| 318 | blob_reset(&content); |
| 319 | }else{ |
| 320 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -309,11 +309,11 @@ | |
| 309 | rc = getStat(zFN, 1); |
| 310 | if( rc ){ |
| 311 | rc = 0; /* It does not exist at all. */ |
| 312 | }else if( S_ISDIR(fileStat.st_mode) ){ |
| 313 | rc = 1; /* It exists and is a real directory. */ |
| 314 | }else if( db_allow_symlinks() && S_ISLNK(fileStat.st_mode) ){ |
| 315 | Blob content; |
| 316 | blob_read_link(&content, zFN); /* It exists and is a link. */ |
| 317 | rc = file_wd_isdir(blob_str(&content)); /* Points to directory? */ |
| 318 | blob_reset(&content); |
| 319 | }else{ |
| 320 |