SQLite

Check-in [2a4493f4ad]
Login

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

Overview
Comment:Fix the zipfile extension so that it is able to create symbolic link entries in the ZIP file even on systems like Win32 that do not support symbolic links on the native filesystem.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 2a4493f4ad2d09c1097e98e7086623669f3f252571884d515e51a98b1c6855e1
User & Date: drh 2018-03-10 12:34:08.954
Context
2018-03-10
12:53
Avoid harmless left-shifts of negative numbers in the zipfile extension when building ZIP archives of files with pre-DOS dates. (check-in: 16bba8650c user: drh tags: trunk)
12:34
Fix the zipfile extension so that it is able to create symbolic link entries in the ZIP file even on systems like Win32 that do not support symbolic links on the native filesystem. (check-in: 2a4493f4ad user: drh tags: trunk)
2018-03-09
22:18
Fix the .archive command in the CLI so that it actually compresses content. (check-in: 3c2e3c2d3d user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to ext/misc/zipfile.c.
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
  }else{
    const char zTemplate[11] = "-rwxrwxrwx";
    int i;
    if( strlen(z)!=10 ) goto parse_error;
    switch( z[0] ){
      case '-': mode |= S_IFREG; break;
      case 'd': mode |= S_IFDIR; break;
#if !defined(_WIN32) && !defined(WIN32)
      case 'l': mode |= S_IFLNK; break;
#endif
      default: goto parse_error;
    }
    for(i=1; i<10; i++){
      if( z[i]==zTemplate[i] ) mode |= 1 << (9-i);
      else if( z[i]!='-' ) goto parse_error;
    }
  }







<

<







1386
1387
1388
1389
1390
1391
1392

1393

1394
1395
1396
1397
1398
1399
1400
  }else{
    const char zTemplate[11] = "-rwxrwxrwx";
    int i;
    if( strlen(z)!=10 ) goto parse_error;
    switch( z[0] ){
      case '-': mode |= S_IFREG; break;
      case 'd': mode |= S_IFDIR; break;

      case 'l': mode |= S_IFLNK; break;

      default: goto parse_error;
    }
    for(i=1; i<10; i++){
      if( z[i]==zTemplate[i] ) mode |= 1 << (9-i);
      else if( z[i]!='-' ) goto parse_error;
    }
  }