Fossil SCM

Fix a bug in the "fossil add" command that prevented the adding of symbolic links.

drh 2017-11-30 18:07 UTC symlink-refactor
Commit b2594738460036b9350f8c4ddd72b186ea1f53b536ea38f52bca31c33e56fde3
1 file changed -5
-5
--- src/file.c
+++ src/file.c
@@ -339,15 +339,10 @@
339339
rc = getStat(zFN, eFType);
340340
if( rc ){
341341
rc = 0; /* It does not exist at all. */
342342
}else if( S_ISDIR(fx.fileStat.st_mode) ){
343343
rc = 1; /* It exists and is a real directory. */
344
- }else if( S_ISLNK(fx.fileStat.st_mode) ){
345
- Blob content;
346
- blob_read_link(&content, zFN); /* It exists and is a link. */
347
- rc = file_isdir(blob_str(&content), eFType); /* Points to directory? */
348
- blob_reset(&content);
349344
}else{
350345
rc = 2; /* It exists and is something else. */
351346
}
352347
free(zFN);
353348
return rc;
354349
--- src/file.c
+++ src/file.c
@@ -339,15 +339,10 @@
339 rc = getStat(zFN, eFType);
340 if( rc ){
341 rc = 0; /* It does not exist at all. */
342 }else if( S_ISDIR(fx.fileStat.st_mode) ){
343 rc = 1; /* It exists and is a real directory. */
344 }else if( S_ISLNK(fx.fileStat.st_mode) ){
345 Blob content;
346 blob_read_link(&content, zFN); /* It exists and is a link. */
347 rc = file_isdir(blob_str(&content), eFType); /* Points to directory? */
348 blob_reset(&content);
349 }else{
350 rc = 2; /* It exists and is something else. */
351 }
352 free(zFN);
353 return rc;
354
--- src/file.c
+++ src/file.c
@@ -339,15 +339,10 @@
339 rc = getStat(zFN, eFType);
340 if( rc ){
341 rc = 0; /* It does not exist at all. */
342 }else if( S_ISDIR(fx.fileStat.st_mode) ){
343 rc = 1; /* It exists and is a real directory. */
 
 
 
 
 
344 }else{
345 rc = 2; /* It exists and is something else. */
346 }
347 free(zFN);
348 return rc;
349

Keyboard Shortcuts

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