File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -333,11 +333,6 @@ func transferBlocks(flatfsdir string) error {
333333 }
334334
335335 rel := p [len (flatfsdir )+ 1 :]
336- if ! strings .HasPrefix (rel , "1220" ) {
337- fmt .Println ("skipping: " , rel )
338- return nil
339- }
340-
341336 if ! strings .HasSuffix (rel , ".data" ) {
342337 fmt .Println ("skipping (no .data): " , rel )
343338 return nil
@@ -352,6 +347,12 @@ func transferBlocks(flatfsdir string) error {
352347 prog .Next ()
353348 rel := p [len (flatfsdir )+ 1 :]
354349
350+ justkey := rel [:len (rel )- 5 ]
351+ if validateNewKey (justkey ) {
352+ prog .Skip ()
353+ fmt .Printf ("skipping %s, already in new format\n " , justkey )
354+ }
355+
355356 _ , fi := filepath .Split (rel [:len (rel )- 5 ])
356357 k , err := hex .DecodeString (fi )
357358 if err != nil {
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ test_expect_success "add some files with the path clean bug" '
8383 printf cdbd | ipfs add -q >> buggy_hashes &&
8484 printf aabdb | ipfs add -q >> buggy_hashes &&
8585 printf bccac | ipfs add -q >> buggy_hashes &&
86+ echo 0243397916 | ipfs add -q >> buggy_hashes && # produces /../ in binary key
8687 sort buggy_hashes -o buggy_hashes
8788
8889'
You can’t perform that action at this time.
0 commit comments