Fossil SCM

Restore the ability to add symlinks located inside subdirectories

andygoth 2020-09-15 19:23 trunk
Commit 9d75d6ae887d17efcf161c549933505b9daf034de21a7629713ea90db247488e
1 file changed +2 -1
+2 -1
--- src/add.c
+++ src/add.c
@@ -169,18 +169,19 @@
169169
" WHERE pathname=%Q %s AND deleted",
170170
zPath, filename_collation());
171171
}else{
172172
char *zFullname = mprintf("%s%s", g.zLocalRoot, zPath);
173173
int isExe = file_isexe(zFullname, RepoFILE);
174
+ int isLink = file_islink(0);
174175
if( file_nondir_objects_on_path(g.zLocalRoot, zFullname) ){
175176
/* Do not add unsafe files to the vfile */
176177
doSkip = 1;
177178
}else{
178179
db_multi_exec(
179180
"INSERT INTO vfile(vid,deleted,rid,mrid,pathname,isexe,islink,mhash)"
180181
"VALUES(%d,0,0,0,%Q,%d,%d,NULL)",
181
- vid, zPath, isExe, file_islink(0));
182
+ vid, zPath, isExe, isLink);
182183
}
183184
fossil_free(zFullname);
184185
}
185186
if( db_changes() && !doSkip ){
186187
fossil_print("ADDED %s\n", zPath);
187188
--- src/add.c
+++ src/add.c
@@ -169,18 +169,19 @@
169 " WHERE pathname=%Q %s AND deleted",
170 zPath, filename_collation());
171 }else{
172 char *zFullname = mprintf("%s%s", g.zLocalRoot, zPath);
173 int isExe = file_isexe(zFullname, RepoFILE);
 
174 if( file_nondir_objects_on_path(g.zLocalRoot, zFullname) ){
175 /* Do not add unsafe files to the vfile */
176 doSkip = 1;
177 }else{
178 db_multi_exec(
179 "INSERT INTO vfile(vid,deleted,rid,mrid,pathname,isexe,islink,mhash)"
180 "VALUES(%d,0,0,0,%Q,%d,%d,NULL)",
181 vid, zPath, isExe, file_islink(0));
182 }
183 fossil_free(zFullname);
184 }
185 if( db_changes() && !doSkip ){
186 fossil_print("ADDED %s\n", zPath);
187
--- src/add.c
+++ src/add.c
@@ -169,18 +169,19 @@
169 " WHERE pathname=%Q %s AND deleted",
170 zPath, filename_collation());
171 }else{
172 char *zFullname = mprintf("%s%s", g.zLocalRoot, zPath);
173 int isExe = file_isexe(zFullname, RepoFILE);
174 int isLink = file_islink(0);
175 if( file_nondir_objects_on_path(g.zLocalRoot, zFullname) ){
176 /* Do not add unsafe files to the vfile */
177 doSkip = 1;
178 }else{
179 db_multi_exec(
180 "INSERT INTO vfile(vid,deleted,rid,mrid,pathname,isexe,islink,mhash)"
181 "VALUES(%d,0,0,0,%Q,%d,%d,NULL)",
182 vid, zPath, isExe, isLink);
183 }
184 fossil_free(zFullname);
185 }
186 if( db_changes() && !doSkip ){
187 fossil_print("ADDED %s\n", zPath);
188

Keyboard Shortcuts

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