From 2e2c1e18ee5cdb2f268373399c7882de4c71e185 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Sun, 18 Apr 2021 15:52:50 -0400 Subject: [PATCH] Fix user home path not being resolved On Linux and Mac the ~ alias for the home directory is not resolved. Use the Java "user.home" property instead. --- src/main/java/io/github/dozius/TwisterSisterExtension.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/dozius/TwisterSisterExtension.java b/src/main/java/io/github/dozius/TwisterSisterExtension.java index c1da088..b3df5eb 100644 --- a/src/main/java/io/github/dozius/TwisterSisterExtension.java +++ b/src/main/java/io/github/dozius/TwisterSisterExtension.java @@ -129,10 +129,10 @@ private String getSpecificDeviceSettingsPath() return userProfile + "/Documents/Bitwig Studio/Extensions/" + file; case MAC: - return "~/Documents/Bitwig Studio/Extensions/" + file; + return System.getProperty("user.home") + "/Documents/Bitwig Studio/Extensions/" + file; case LINUX: - return "~/Bitwig Studio/Extensions/" + file; + return System.getProperty("user.home") + "/Bitwig Studio/Extensions/" + file; default: throw new IllegalArgumentException("Unknown Platform");