From 23e270b603eb32472b8ef4a5f44c01af57fd049f Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Mon, 23 Nov 2015 18:53:18 +0100 Subject: Use Java 8 Path API to relativize paths instead of rolling a custom version. Fixes various IOExceptions thrown during generation. --- src/Locations/LocationService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Locations') diff --git a/src/Locations/LocationService.kt b/src/Locations/LocationService.kt index 4f587361..15a4ebac 100644 --- a/src/Locations/LocationService.kt +++ b/src/Locations/LocationService.kt @@ -27,7 +27,7 @@ public data class FileLocation(val file: File): Location { return "." } val ownerFolder = file.parentFile!! - val relativePath = ownerFolder.getRelativePath(other.file).path + val relativePath = ownerFolder.toPath().relativize(other.file.toPath()).toString() return if (anchor == null) relativePath else relativePath + "#" + anchor } } -- cgit