Fossil

Check-in [4027ad4b]
Login

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

Overview
Comment:fixed [9ff56ae8a6] - "fossil sha" crash
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dead-end
Files: files | file ages | folders
SHA1:4027ad4b7e5d18294b0c102b242167df8314a599
User & Date: ron 2010-02-06 20:20:59
References
2010-02-08
17:22 New ticket [e42448ed] "co --latest" not working anymore?. artifact: 7414994f user: bharder
2010-02-06
20:21 Fixed ticket [9ff56ae8]: "fossil sha xxx" crashes w/ assert if "xxx" doesn't exist plus 2 other changes artifact: 7933badd user: ron
Context
2010-02-08
14:20
Added better error message when trying to remove a directory. Closed-Leaf check-in: 1761fee0 user: jeremy_c tags: dead-end
2010-02-06
20:20
fixed [9ff56ae8a6] - "fossil sha" crash check-in: 4027ad4b user: ron tags: dead-end
17:25
Windows only: remove duplicate code from sqlite3.c in db.c check-in: 2f58d48c user: ron tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/sha1.c.

609
610
611
612
613
614
615



616
617
618
619
620
621
  Blob cksum;
  
  for(i=2; i<g.argc; i++){
    if( g.argv[i][0]=='-' && g.argv[i][1]==0 ){
      blob_read_from_channel(&in, stdin, -1);
      sha1sum_blob(&in, &cksum);
    }else{



      sha1sum_file(g.argv[i], &cksum);
    }
    printf("%s  %s\n", blob_str(&cksum), g.argv[i]);
    blob_reset(&cksum);
  }
}







>
>
>






609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
  Blob cksum;
  
  for(i=2; i<g.argc; i++){
    if( g.argv[i][0]=='-' && g.argv[i][1]==0 ){
      blob_read_from_channel(&in, stdin, -1);
      sha1sum_blob(&in, &cksum);
    }else{
	  if (access(g.argv[i], R_OK)) {
		  fossil_fatal("cannot open %s", g.argv[i]);
	  }
      sha1sum_file(g.argv[i], &cksum);
    }
    printf("%s  %s\n", blob_str(&cksum), g.argv[i]);
    blob_reset(&cksum);
  }
}