Fossil SCM
Add comment describing file_wd_isfile() function.
Commit
f23334cbda2ee24202584a973e2ca823bbafc7e5
Parent
a0b3769b0122cb3…
1 file changed
+3
+3
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -142,10 +142,13 @@ | ||
| 142 | 142 | */ |
| 143 | 143 | int file_isfile(const char *zFilename){ |
| 144 | 144 | return getStat(zFilename, 0) ? 0 : S_ISREG(fileStat.st_mode); |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | +/* | |
| 148 | +** Same as file_isfile(), but takes into account symlinks. | |
| 149 | +*/ | |
| 147 | 150 | int file_wd_isfile(const char *zFilename){ |
| 148 | 151 | return getStat(zFilename, 1) ? 0 : S_ISREG(fileStat.st_mode); |
| 149 | 152 | } |
| 150 | 153 | |
| 151 | 154 | /* |
| 152 | 155 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -142,10 +142,13 @@ | |
| 142 | */ |
| 143 | int file_isfile(const char *zFilename){ |
| 144 | return getStat(zFilename, 0) ? 0 : S_ISREG(fileStat.st_mode); |
| 145 | } |
| 146 | |
| 147 | int file_wd_isfile(const char *zFilename){ |
| 148 | return getStat(zFilename, 1) ? 0 : S_ISREG(fileStat.st_mode); |
| 149 | } |
| 150 | |
| 151 | /* |
| 152 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -142,10 +142,13 @@ | |
| 142 | */ |
| 143 | int file_isfile(const char *zFilename){ |
| 144 | return getStat(zFilename, 0) ? 0 : S_ISREG(fileStat.st_mode); |
| 145 | } |
| 146 | |
| 147 | /* |
| 148 | ** Same as file_isfile(), but takes into account symlinks. |
| 149 | */ |
| 150 | int file_wd_isfile(const char *zFilename){ |
| 151 | return getStat(zFilename, 1) ? 0 : S_ISREG(fileStat.st_mode); |
| 152 | } |
| 153 | |
| 154 | /* |
| 155 |