From b5da4e98571b02dc106de4f9b2cb2a298489f1b1 Mon Sep 17 00:00:00 2001 From: Alberto Cortés Date: Wed, 22 Feb 2017 16:45:46 +0100 Subject: Fix issue 275 (edited) (#276) Fix #275 . It was not possible to write a test for this issue as the original fsnoder didn't support filenames with length > 1. Therefore this patch has 3 commits: add support for long filenames in fsnoder. add a test case for the issue using the new long filenames from step 1. fix the issue by comparing paths level by level instead of lexigographically over the whole path. --- utils/merkletrie/internal/fsnoder/doc.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'utils/merkletrie/internal/fsnoder/doc.go') diff --git a/utils/merkletrie/internal/fsnoder/doc.go b/utils/merkletrie/internal/fsnoder/doc.go index 86cae7c..3f55b5f 100644 --- a/utils/merkletrie/internal/fsnoder/doc.go +++ b/utils/merkletrie/internal/fsnoder/doc.go @@ -18,13 +18,15 @@ will create a noder as follows: Files are expressed as: -- a single letter for the name of the file. +- one or more letters and dots for the name of the file - a single number, between angle brackets, for the contents of the file. +- examples: a<1>, foo.go<2>. + Directories are expressed as: -- a single letter for the name of the directory. +- one or more letters for the name of the directory. - its elements between parents, separated with spaces, in any order. -- cgit