Fossil

Check-in [16da26c5]
Login

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

Overview
Comment:Support symlinks in ZIP files.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | symlinks
Files: files | file ages | folders
SHA1: 16da26c5858f1152eadf024e550c06bb2b4be490
User & Date: dmitry 2011-08-24 19:12:01.320
Context
2011-08-24
20:01
Support symlinks in tarballs. ... (check-in: 72e3bbd0 user: dmitry tags: symlinks)
19:12
Support symlinks in ZIP files. ... (check-in: 16da26c5 user: dmitry tags: symlinks)
2011-08-23
17:44
Fill islink field in vfile table when adding files. Support symlinks in export. Make manifest_file_perm() return 2 for symlinks. Add file_perm() function, and use it instead of file_isexe() when we need both isexe and islink properties. ... (check-in: 4619361d user: dmitry tags: symlinks)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/zip.c.
137
138
139
140
141
142
143





144
145
146
147
148
149
150
151
  char zOutBuf[100000];

  /* Fill in as much of the header as we know.
  */
  nBlob = pFile ? blob_size(pFile) : 0;
  if( nBlob>0 ){
    iMethod = 8;





    iMode = ( mPerm == 1 ) ? 0100755 : 0100644; //TODO(dchest): handle links
  }else{
    iMethod = 0;
    iMode = 040755;
  }
  nameLen = strlen(zName);
  memset(zHdr, 0, sizeof(zHdr));
  put32(&zHdr[0], 0x04034b50);







>
>
>
>
>
|







137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
  char zOutBuf[100000];

  /* Fill in as much of the header as we know.
  */
  nBlob = pFile ? blob_size(pFile) : 0;
  if( nBlob>0 ){
    iMethod = 8;
    if( mPerm==1 )
      iMode = 0100755;  /* executable */
    else if( mPerm==2 )
      iMode = 0120755;  /* symlink */
    else
      iMode = 0100644;  /* normal file */
  }else{
    iMethod = 0;
    iMode = 040755;
  }
  nameLen = strlen(zName);
  memset(zHdr, 0, sizeof(zHdr));
  put32(&zHdr[0], 0x04034b50);