From: Tod Date: Mon, 5 Feb 2018 23:30:17 +0000 (+0800) Subject: Fix the relative path issue of JNI lib loader (#16754) X-Git-Tag: upstream/v1.7.0~266 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a9485a4b59477c722ed480baec9043d04cc25ea0;p=platform%2Fupstream%2Ftensorflow.git Fix the relative path issue of JNI lib loader (#16754) --- diff --git a/tensorflow/java/src/main/java/org/tensorflow/NativeLibrary.java b/tensorflow/java/src/main/java/org/tensorflow/NativeLibrary.java index 499757e..cf773e1 100644 --- a/tensorflow/java/src/main/java/org/tensorflow/NativeLibrary.java +++ b/tensorflow/java/src/main/java/org/tensorflow/NativeLibrary.java @@ -88,7 +88,7 @@ final class NativeLibrary { // Deletions are in the reverse order of requests, so we need to request that the directory be // deleted first, so that it is empty when the request is fulfilled. tempPath.deleteOnExit(); - final String tempDirectory = tempPath.toString(); + final String tempDirectory = tempPath.getCanonicalPath(); if (frameworkResource != null) { extractResource(frameworkResource, frameworkLibName, tempDirectory); } else {