Fossil SCM
Fix a bug in the "fossil add" command that prevented the adding of symbolic links.
Commit
b2594738460036b9350f8c4ddd72b186ea1f53b536ea38f52bca31c33e56fde3
Parent
e7767de2639b219…
1 file changed
-5
-5
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -339,15 +339,10 @@ | ||
| 339 | 339 | rc = getStat(zFN, eFType); |
| 340 | 340 | if( rc ){ |
| 341 | 341 | rc = 0; /* It does not exist at all. */ |
| 342 | 342 | }else if( S_ISDIR(fx.fileStat.st_mode) ){ |
| 343 | 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 | 344 | }else{ |
| 350 | 345 | rc = 2; /* It exists and is something else. */ |
| 351 | 346 | } |
| 352 | 347 | free(zFN); |
| 353 | 348 | return rc; |
| 354 | 349 |
| --- 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 |