Fossil

Check-in [3d5cf48b]
Login

Check-in [3d5cf48b]

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

Overview
Comment:Do not set the directory permission bit on empty files when creating a ZIP archive.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3d5cf48bf2828ecd8f2e04d7ca02a86c77cfa4c1
User & Date: mistachkin 2016-01-06 19:49:49
Context
2016-01-07
18:22
When generating ZIP archives, files with zero bytes are 'Stored', not 'Deflated'. ... (check-in: ecedaf93 user: mistachkin tags: trunk)
10:02
Merge trunk. ... (check-in: 99f7662b user: jan tags: jan-manifest-tags)
2016-01-06
20:49
Merge trunk ... (check-in: 9e1fa626 user: jan.nijtmans tags: pending-review)
19:49
Do not set the directory permission bit on empty files when creating a ZIP archive. ... (check-in: 3d5cf48b user: mistachkin tags: trunk)
19:44
Do not set the directory permission bit on empty files when creating a ZIP archive. ... (Closed-Leaf check-in: 18607775 user: mistachkin tags: pending-review)
17:18
Add '-quiet' command line option to the test suite. ... (check-in: c2e42166 user: mistachkin tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/zip.c.
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
  char zExTime[13];
  char zBuf[100];
  char zOutBuf[100000];

  /* Fill in as much of the header as we know.
  */
  nBlob = pFile ? blob_size(pFile) : 0;
  if( nBlob>0 ){
    iMethod = 8;
    switch( mPerm ){
      case PERM_LNK:   iMode = 0120755;   break;
      case PERM_EXE:   iMode = 0100755;   break;
      default:         iMode = 0100644;   break;
    }
  }else{
    iMethod = 0;
    iMode = 040755;
  }
  nameLen = strlen(zName);
  memset(zHdr, 0, sizeof(zHdr));
  put32(&zHdr[0], 0x04034b50);
  put16(&zHdr[4], 0x000a);







|






|







140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
  char zExTime[13];
  char zBuf[100];
  char zOutBuf[100000];

  /* Fill in as much of the header as we know.
  */
  nBlob = pFile ? blob_size(pFile) : 0;
  if( pFile ){ /* This is a file, possibly empty... */
    iMethod = 8;
    switch( mPerm ){
      case PERM_LNK:   iMode = 0120755;   break;
      case PERM_EXE:   iMode = 0100755;   break;
      default:         iMode = 0100644;   break;
    }
  }else{       /* This is a directory, no blob... */
    iMethod = 0;
    iMode = 040755;
  }
  nameLen = strlen(zName);
  memset(zHdr, 0, sizeof(zHdr));
  put32(&zHdr[0], 0x04034b50);
  put16(&zHdr[4], 0x000a);