Fossil SCM
Fix the setting of the "x" property for files in a delta-manifest on unix. Ticket [a4295406dde4682facd619].
Commit
9e6f20bdf993b22eebd63761d72ffbed41b8f18a
Parent
ff2a87103bf16f4…
1 file changed
+4
-3
+4
-3
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -636,15 +636,17 @@ | ||
| 636 | 636 | int frid = db_column_int(&q, 3); |
| 637 | 637 | int isexe = db_column_int(&q, 4); |
| 638 | 638 | int isSelected = db_column_int(&q, 5); |
| 639 | 639 | const char *zPerm; |
| 640 | 640 | int cmp; |
| 641 | - blob_append(&filename, zName, -1); | |
| 642 | 641 | #if !defined(_WIN32) |
| 643 | 642 | /* For unix, extract the "executable" permission bit directly from |
| 644 | 643 | ** the filesystem. On windows, the "executable" bit is retained |
| 645 | - ** unchanged from the original. */ | |
| 644 | + ** unchanged from the original. | |
| 645 | + */ | |
| 646 | + blob_resize(&filename, nBasename); | |
| 647 | + blob_append(&filename, zName, -1); | |
| 646 | 648 | isexe = file_isexe(blob_str(&filename)); |
| 647 | 649 | #endif |
| 648 | 650 | if( isexe ){ |
| 649 | 651 | zPerm = " x"; |
| 650 | 652 | }else{ |
| @@ -659,11 +661,10 @@ | ||
| 659 | 661 | cmp = 1; |
| 660 | 662 | if( pFile==0 |
| 661 | 663 | || (cmp = fossil_strcmp(pFile->zName,zName))!=0 |
| 662 | 664 | || fossil_strcmp(pFile->zUuid, zUuid)!=0 |
| 663 | 665 | ){ |
| 664 | - blob_resize(&filename, nBasename); | |
| 665 | 666 | if( zOrig && !isSelected ){ zName = zOrig; zOrig = 0; } |
| 666 | 667 | if( zOrig==0 || fossil_strcmp(zOrig,zName)==0 ){ |
| 667 | 668 | blob_appendf(pOut, "F %F %s%s\n", zName, zUuid, zPerm); |
| 668 | 669 | }else{ |
| 669 | 670 | if( zPerm[0]==0 ){ zPerm = " w"; } |
| 670 | 671 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -636,15 +636,17 @@ | |
| 636 | int frid = db_column_int(&q, 3); |
| 637 | int isexe = db_column_int(&q, 4); |
| 638 | int isSelected = db_column_int(&q, 5); |
| 639 | const char *zPerm; |
| 640 | int cmp; |
| 641 | blob_append(&filename, zName, -1); |
| 642 | #if !defined(_WIN32) |
| 643 | /* For unix, extract the "executable" permission bit directly from |
| 644 | ** the filesystem. On windows, the "executable" bit is retained |
| 645 | ** unchanged from the original. */ |
| 646 | isexe = file_isexe(blob_str(&filename)); |
| 647 | #endif |
| 648 | if( isexe ){ |
| 649 | zPerm = " x"; |
| 650 | }else{ |
| @@ -659,11 +661,10 @@ | |
| 659 | cmp = 1; |
| 660 | if( pFile==0 |
| 661 | || (cmp = fossil_strcmp(pFile->zName,zName))!=0 |
| 662 | || fossil_strcmp(pFile->zUuid, zUuid)!=0 |
| 663 | ){ |
| 664 | blob_resize(&filename, nBasename); |
| 665 | if( zOrig && !isSelected ){ zName = zOrig; zOrig = 0; } |
| 666 | if( zOrig==0 || fossil_strcmp(zOrig,zName)==0 ){ |
| 667 | blob_appendf(pOut, "F %F %s%s\n", zName, zUuid, zPerm); |
| 668 | }else{ |
| 669 | if( zPerm[0]==0 ){ zPerm = " w"; } |
| 670 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -636,15 +636,17 @@ | |
| 636 | int frid = db_column_int(&q, 3); |
| 637 | int isexe = db_column_int(&q, 4); |
| 638 | int isSelected = db_column_int(&q, 5); |
| 639 | const char *zPerm; |
| 640 | int cmp; |
| 641 | #if !defined(_WIN32) |
| 642 | /* For unix, extract the "executable" permission bit directly from |
| 643 | ** the filesystem. On windows, the "executable" bit is retained |
| 644 | ** unchanged from the original. |
| 645 | */ |
| 646 | blob_resize(&filename, nBasename); |
| 647 | blob_append(&filename, zName, -1); |
| 648 | isexe = file_isexe(blob_str(&filename)); |
| 649 | #endif |
| 650 | if( isexe ){ |
| 651 | zPerm = " x"; |
| 652 | }else{ |
| @@ -659,11 +661,10 @@ | |
| 661 | cmp = 1; |
| 662 | if( pFile==0 |
| 663 | || (cmp = fossil_strcmp(pFile->zName,zName))!=0 |
| 664 | || fossil_strcmp(pFile->zUuid, zUuid)!=0 |
| 665 | ){ |
| 666 | if( zOrig && !isSelected ){ zName = zOrig; zOrig = 0; } |
| 667 | if( zOrig==0 || fossil_strcmp(zOrig,zName)==0 ){ |
| 668 | blob_appendf(pOut, "F %F %s%s\n", zName, zUuid, zPerm); |
| 669 | }else{ |
| 670 | if( zPerm[0]==0 ){ zPerm = " w"; } |
| 671 |