Mercurial > jhg
diff src/org/tmatesoft/hg/repo/HgManifest.java @ 320:678e326fd27c
Issue 15: Exception accessing oddly named file from history
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 30 Sep 2011 06:22:11 +0200 |
parents | c1e3c18fd2f2 |
children | ac38e75c9e8e |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgManifest.java Thu Sep 29 04:37:52 2011 +0200 +++ b/src/org/tmatesoft/hg/repo/HgManifest.java Fri Sep 30 06:22:11 2011 +0200 @@ -20,6 +20,7 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Arrays; @@ -27,6 +28,7 @@ import org.tmatesoft.hg.core.Nodeid; import org.tmatesoft.hg.internal.DataAccess; import org.tmatesoft.hg.internal.DigestHelper; +import org.tmatesoft.hg.internal.EncodingHelper; import org.tmatesoft.hg.internal.Experimental; import org.tmatesoft.hg.internal.IterateControlMediator; import org.tmatesoft.hg.internal.Lifecycle; @@ -268,7 +270,7 @@ public Path freeze() { if (result == null) { - result = Path.create(new String(data, start, length)); + result = Path.create(EncodingHelper.fromManifest(data, start, length)); // release reference to bigger data array, make a copy of relevant part only // use original bytes, not those from String above to avoid cache misses due to different encodings byte[] d = new byte[length];