Fixed cases where 32-bit and 64-bit jvm is used with the same cache dir.

This commit is contained in:
Adam Murdoch
2013-12-06 19:17:38 +11:00
parent 96cb3ca34f
commit 99f7be1163

View File

@@ -33,7 +33,7 @@ public class NativeLibraryLocator {
public File find(LibraryDef libraryDef) throws IOException {
String resourceName = String.format("net/rubygrapefruit/platform/%s/%s", libraryDef.platform, libraryDef.name);
if (extractDir != null) {
File libFile = new File(extractDir, String.format("%s/%s", NativeLibraryFunctions.VERSION, libraryDef.name));
File libFile = new File(extractDir, String.format("%s/%s/%s", NativeLibraryFunctions.VERSION, libraryDef.platform, libraryDef.name));
File lockFile = new File(libFile.getParentFile(), libFile.getName() + ".lock");
lockFile.getParentFile().mkdirs();
lockFile.createNewFile();