Fossil SCM

Fix the fossil_stat() routine (broken by check-in [39a5df1fde741d08]) so that it responds correctly when the second argument is SymFILE. This is a fix for the problem described in [forum:/info/251ffc0584|Forum post 251ffc0584]

drh 2020-10-10 00:01 trunk
Commit 4d445ead4cdca1ff553f92bf4eb10cea6fa003207ec500ae6eadd8b9cc1f0e38
1 file changed +1 -1
+1 -1
--- src/file.c
+++ src/file.c
@@ -133,11 +133,11 @@
133133
int eFType /* Look at symlink itself if RepoFILE and enabled. */
134134
){
135135
int rc;
136136
void *zMbcs = fossil_utf8_to_path(zFilename, 0);
137137
#if !defined(_WIN32)
138
- if( (eFType=RepoFILE && db_allow_symlinks())
138
+ if( (eFType==RepoFILE && db_allow_symlinks())
139139
|| eFType==SymFILE ){
140140
/* Symlinks look like files whose content is the name of the target */
141141
rc = lstat(zMbcs, buf);
142142
}else{
143143
/* Symlinks look like the object to which they point */
144144
--- src/file.c
+++ src/file.c
@@ -133,11 +133,11 @@
133 int eFType /* Look at symlink itself if RepoFILE and enabled. */
134 ){
135 int rc;
136 void *zMbcs = fossil_utf8_to_path(zFilename, 0);
137 #if !defined(_WIN32)
138 if( (eFType=RepoFILE && db_allow_symlinks())
139 || eFType==SymFILE ){
140 /* Symlinks look like files whose content is the name of the target */
141 rc = lstat(zMbcs, buf);
142 }else{
143 /* Symlinks look like the object to which they point */
144
--- src/file.c
+++ src/file.c
@@ -133,11 +133,11 @@
133 int eFType /* Look at symlink itself if RepoFILE and enabled. */
134 ){
135 int rc;
136 void *zMbcs = fossil_utf8_to_path(zFilename, 0);
137 #if !defined(_WIN32)
138 if( (eFType==RepoFILE && db_allow_symlinks())
139 || eFType==SymFILE ){
140 /* Symlinks look like files whose content is the name of the target */
141 rc = lstat(zMbcs, buf);
142 }else{
143 /* Symlinks look like the object to which they point */
144

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button