Fossil SCM
Removed an if() condition in content_put_ex() which was possible back in 2007 but is no longer possible. Updated the surrounding content to reflect current reality.
Commit
dad521bb06757a7fc3c5e07b5bf818df3e5cc7de544fe5c7f2d34142574bd540
Parent
c8021e99dfc5ab2…
1 file changed
+3
-4
+3
-4
| --- src/content.c | ||
| +++ src/content.c | ||
| @@ -555,14 +555,13 @@ | ||
| 555 | 555 | ** or not the entry is a phantom |
| 556 | 556 | */ |
| 557 | 557 | db_prepare(&s1, "SELECT rid, size FROM blob WHERE uuid=%B", &hash); |
| 558 | 558 | if( db_step(&s1)==SQLITE_ROW ){ |
| 559 | 559 | rid = db_column_int(&s1, 0); |
| 560 | - if( db_column_int(&s1, 1)>=0 || pBlob==0 ){ | |
| 561 | - /* Either the entry is not a phantom or it is a phantom but we | |
| 562 | - ** have no data with which to dephantomize it. In either case, | |
| 563 | - ** there is nothing for us to do other than return the RID. */ | |
| 560 | + if( db_column_int(&s1, 1)>=0 ){ | |
| 561 | + /* The entry is not a phantom. There is nothing for us to do | |
| 562 | + ** other than return the RID. */ | |
| 564 | 563 | db_finalize(&s1); |
| 565 | 564 | db_end_transaction(0); |
| 566 | 565 | return rid; |
| 567 | 566 | } |
| 568 | 567 | }else{ |
| 569 | 568 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -555,14 +555,13 @@ | |
| 555 | ** or not the entry is a phantom |
| 556 | */ |
| 557 | db_prepare(&s1, "SELECT rid, size FROM blob WHERE uuid=%B", &hash); |
| 558 | if( db_step(&s1)==SQLITE_ROW ){ |
| 559 | rid = db_column_int(&s1, 0); |
| 560 | if( db_column_int(&s1, 1)>=0 || pBlob==0 ){ |
| 561 | /* Either the entry is not a phantom or it is a phantom but we |
| 562 | ** have no data with which to dephantomize it. In either case, |
| 563 | ** there is nothing for us to do other than return the RID. */ |
| 564 | db_finalize(&s1); |
| 565 | db_end_transaction(0); |
| 566 | return rid; |
| 567 | } |
| 568 | }else{ |
| 569 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -555,14 +555,13 @@ | |
| 555 | ** or not the entry is a phantom |
| 556 | */ |
| 557 | db_prepare(&s1, "SELECT rid, size FROM blob WHERE uuid=%B", &hash); |
| 558 | if( db_step(&s1)==SQLITE_ROW ){ |
| 559 | rid = db_column_int(&s1, 0); |
| 560 | if( db_column_int(&s1, 1)>=0 ){ |
| 561 | /* The entry is not a phantom. There is nothing for us to do |
| 562 | ** other than return the RID. */ |
| 563 | db_finalize(&s1); |
| 564 | db_end_transaction(0); |
| 565 | return rid; |
| 566 | } |
| 567 | }else{ |
| 568 |