Fossil SCM

Fix the setting of the "x" property for files in a delta-manifest on unix. Ticket [a4295406dde4682facd619].

drh 2011-01-04 17:50 trunk
Commit 9e6f20bdf993b22eebd63761d72ffbed41b8f18a
1 file changed +4 -3
+4 -3
--- src/checkin.c
+++ src/checkin.c
@@ -636,15 +636,17 @@
636636
int frid = db_column_int(&q, 3);
637637
int isexe = db_column_int(&q, 4);
638638
int isSelected = db_column_int(&q, 5);
639639
const char *zPerm;
640640
int cmp;
641
- blob_append(&filename, zName, -1);
642641
#if !defined(_WIN32)
643642
/* For unix, extract the "executable" permission bit directly from
644643
** 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);
646648
isexe = file_isexe(blob_str(&filename));
647649
#endif
648650
if( isexe ){
649651
zPerm = " x";
650652
}else{
@@ -659,11 +661,10 @@
659661
cmp = 1;
660662
if( pFile==0
661663
|| (cmp = fossil_strcmp(pFile->zName,zName))!=0
662664
|| fossil_strcmp(pFile->zUuid, zUuid)!=0
663665
){
664
- blob_resize(&filename, nBasename);
665666
if( zOrig && !isSelected ){ zName = zOrig; zOrig = 0; }
666667
if( zOrig==0 || fossil_strcmp(zOrig,zName)==0 ){
667668
blob_appendf(pOut, "F %F %s%s\n", zName, zUuid, zPerm);
668669
}else{
669670
if( zPerm[0]==0 ){ zPerm = " w"; }
670671
--- 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

Keyboard Shortcuts

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