Fossil SCM

Potential fix for ticket [d752140c7a]. The reconstruct op appears to have been importing raw directory entries into the blob table.

stephan 2014-02-04 20:14 trunk
Commit 8e110293edfa93c6b2da7f45bbc76f5f782ef728
1 file changed +14 -13
+14 -13
--- src/rebuild.c
+++ src/rebuild.c
@@ -861,23 +861,24 @@
861861
zUtf8Name = fossil_filename_to_utf8(pEntry->d_name);
862862
zSubpath = mprintf("%s/%s", zPath, zUtf8Name);
863863
fossil_filename_free(zUtf8Name);
864864
if( file_isdir(zSubpath)==1 ){
865865
recon_read_dir(zSubpath);
866
- }
867
- blob_init(&path, 0, 0);
868
- blob_appendf(&path, "%s", zSubpath);
869
- if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){
870
- fossil_fatal("some unknown error occurred while reading \"%s\"",
871
- blob_str(&path));
872
- }
873
- content_put(&aContent);
874
- blob_reset(&path);
875
- blob_reset(&aContent);
876
- free(zSubpath);
877
- fossil_print("\r%d", ++nFileRead);
878
- fflush(stdout);
866
+ }else{
867
+ blob_init(&path, 0, 0);
868
+ blob_appendf(&path, "%s", zSubpath);
869
+ if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){
870
+ fossil_fatal("some unknown error occurred while reading \"%s\"",
871
+ blob_str(&path));
872
+ }
873
+ content_put(&aContent);
874
+ blob_reset(&path);
875
+ blob_reset(&aContent);
876
+ fossil_print("\r%d", ++nFileRead);
877
+ fflush(stdout);
878
+ }
879
+ free(zSubpath);
879880
}
880881
closedir(d);
881882
}else {
882883
fossil_fatal("encountered error %d while trying to open \"%s\".",
883884
errno, g.argv[3]);
884885
--- src/rebuild.c
+++ src/rebuild.c
@@ -861,23 +861,24 @@
861 zUtf8Name = fossil_filename_to_utf8(pEntry->d_name);
862 zSubpath = mprintf("%s/%s", zPath, zUtf8Name);
863 fossil_filename_free(zUtf8Name);
864 if( file_isdir(zSubpath)==1 ){
865 recon_read_dir(zSubpath);
866 }
867 blob_init(&path, 0, 0);
868 blob_appendf(&path, "%s", zSubpath);
869 if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){
870 fossil_fatal("some unknown error occurred while reading \"%s\"",
871 blob_str(&path));
872 }
873 content_put(&aContent);
874 blob_reset(&path);
875 blob_reset(&aContent);
876 free(zSubpath);
877 fossil_print("\r%d", ++nFileRead);
878 fflush(stdout);
 
879 }
880 closedir(d);
881 }else {
882 fossil_fatal("encountered error %d while trying to open \"%s\".",
883 errno, g.argv[3]);
884
--- src/rebuild.c
+++ src/rebuild.c
@@ -861,23 +861,24 @@
861 zUtf8Name = fossil_filename_to_utf8(pEntry->d_name);
862 zSubpath = mprintf("%s/%s", zPath, zUtf8Name);
863 fossil_filename_free(zUtf8Name);
864 if( file_isdir(zSubpath)==1 ){
865 recon_read_dir(zSubpath);
866 }else{
867 blob_init(&path, 0, 0);
868 blob_appendf(&path, "%s", zSubpath);
869 if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){
870 fossil_fatal("some unknown error occurred while reading \"%s\"",
871 blob_str(&path));
872 }
873 content_put(&aContent);
874 blob_reset(&path);
875 blob_reset(&aContent);
876 fossil_print("\r%d", ++nFileRead);
877 fflush(stdout);
878 }
879 free(zSubpath);
880 }
881 closedir(d);
882 }else {
883 fossil_fatal("encountered error %d while trying to open \"%s\".",
884 errno, g.argv[3]);
885

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button