Fossil

Check-in [fd6f1c5e61]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:When setting execute permission only set it for those users that also have read permission.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fd6f1c5e619fc297da692db468c839c33efec983
User & Date: drh 2011-06-06 17:17:36.879
Original Comment: When setting execute permission only set it for those levels that also have read permission.
Context
2011-06-07
02:09
Merge the venks-emacs changes into trunk. check-in: fbf417b681 user: drh tags: trunk
00:48
Pull the latest trunk changes into the venks-emacs branch. check-in: 690ba8cbdb user: drh tags: venks-emacs
2011-06-06
17:17
When setting execute permission only set it for those users that also have read permission. check-in: fd6f1c5e61 user: drh tags: trunk
17:15
Bug fix: make sure "fossil update" sets the execute permission bit correctly. check-in: 37c231b11d user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/file.c.
197
198
199
200
201
202
203

204
205
206
207
208
209
210
211
212
*/
int file_setexe(const char *zFilename, int onoff){
  int rc = 0;
#if !defined(_WIN32)
  struct stat buf;
  if( stat(zFilename, &buf)!=0 ) return 0;
  if( onoff ){

    if( (buf.st_mode & 0111)!=0111 ){
      chmod(zFilename, buf.st_mode | 0111);
      rc = 1;
    }
  }else{
    if( (buf.st_mode & 0111)!=0 ){
      chmod(zFilename, buf.st_mode & ~0111);
      rc = 1;
    }







>
|
|







197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
*/
int file_setexe(const char *zFilename, int onoff){
  int rc = 0;
#if !defined(_WIN32)
  struct stat buf;
  if( stat(zFilename, &buf)!=0 ) return 0;
  if( onoff ){
    int targetMode = (buf.st_mode & 0444)>>2;
    if( (buf.st_mode & 0111)!=targetMode ){
      chmod(zFilename, buf.st_mode | targetMode);
      rc = 1;
    }
  }else{
    if( (buf.st_mode & 0111)!=0 ){
      chmod(zFilename, buf.st_mode & ~0111);
      rc = 1;
    }
Changes to src/update.c.
427
428
429
430
431
432
433

434
435
436
437
438
439
440
441
442

  /* Report on conflicts
  */
  if( nConflict && !nochangeFlag ){
    if( internalUpdate ){
      internalConflictCnt = nConflict;
    }else{

      fossil_print("WARNING: %d merge conflicts - see messages above for details.\n",
              nConflict);
    }
  }
  
  /*
  ** Clean up the mid and pid VFILE entries.  Then commit the changes.
  */
  if( nochangeFlag ){







>
|
|







427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443

  /* Report on conflicts
  */
  if( nConflict && !nochangeFlag ){
    if( internalUpdate ){
      internalConflictCnt = nConflict;
    }else{
      fossil_print(
         "WARNING: %d merge conflicts - see messages above for details.\n",
         nConflict);
    }
  }
  
  /*
  ** Clean up the mid and pid VFILE entries.  Then commit the changes.
  */
  if( nochangeFlag ){