Fossil SCM
Potential fix for ticket [d752140c7a]. The reconstruct op appears to have been importing raw directory entries into the blob table.
Commit
8e110293edfa93c6b2da7f45bbc76f5f782ef728
Parent
252aff3e6242f54…
1 file changed
+14
-13
+14
-13
| --- src/rebuild.c | ||
| +++ src/rebuild.c | ||
| @@ -861,23 +861,24 @@ | ||
| 861 | 861 | zUtf8Name = fossil_filename_to_utf8(pEntry->d_name); |
| 862 | 862 | zSubpath = mprintf("%s/%s", zPath, zUtf8Name); |
| 863 | 863 | fossil_filename_free(zUtf8Name); |
| 864 | 864 | if( file_isdir(zSubpath)==1 ){ |
| 865 | 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); | |
| 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); | |
| 879 | 880 | } |
| 880 | 881 | closedir(d); |
| 881 | 882 | }else { |
| 882 | 883 | fossil_fatal("encountered error %d while trying to open \"%s\".", |
| 883 | 884 | errno, g.argv[3]); |
| 884 | 885 |
| --- 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 |