Fossil

Check-in [3e2b5c46]
Login

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

Overview
Comment:Fix the "fossil sqlar" command so that it works for the empty initial check-in.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:3e2b5c4630aaf668e6810582cd30e8f7260259deb3bc594a674093791a39ac06
User & Date: drh 2017-12-08 00:07:45
Context
2017-12-08
03:24
Fix the SQL archive generator so that for a check-in containing no files it generates an empty SQL archive instead of an empty file. check-in: 31b9822d user: drh tags: trunk
00:07
Fix the "fossil sqlar" command so that it works for the empty initial check-in. check-in: 3e2b5c46 user: drh tags: trunk
2017-12-07
12:01
Make "fossil sql" an alias for "fossil sqlite3" so that typing "fossil sql" does not generate an ambiguity with the new "fossil sqlar" command. check-in: e02f4bf1 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/zip.c.

631
632
633
634
635
636
637


638
639
640
641
642
643
644
645
646
647
648
  Blob filename;
  int nPrefix;

  Archive sArchive;
  memset(&sArchive, 0, sizeof(Archive));
  sArchive.eType = eType;
  sArchive.pBlob = pZip;



  content_get(rid, &mfile);
  if( blob_size(&mfile)==0 ){
    blob_zero(pZip);
    return;
  }
  blob_set_dynamic(&hash, rid_to_uuid(rid));
  blob_zero(&filename);
  zip_open();

  if( zDir && zDir[0] ){







>
>



<







631
632
633
634
635
636
637
638
639
640
641
642

643
644
645
646
647
648
649
  Blob filename;
  int nPrefix;

  Archive sArchive;
  memset(&sArchive, 0, sizeof(Archive));
  sArchive.eType = eType;
  sArchive.pBlob = pZip;
  blob_zero(&sArchive.tmp);
  blob_zero(pZip);

  content_get(rid, &mfile);
  if( blob_size(&mfile)==0 ){

    return;
  }
  blob_set_dynamic(&hash, rid_to_uuid(rid));
  blob_zero(&filename);
  zip_open();

  if( zDir && zDir[0] ){