homegames-common 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -726,13 +726,13 @@ const log = {
|
|
|
726
726
|
const getAppDataPath = () => {
|
|
727
727
|
switch (process.platform) {
|
|
728
728
|
case "darwin": {
|
|
729
|
-
return path.join(process.env.HOME, "Library", "Application Support", "homegames");
|
|
729
|
+
return process.env.HOME ? path.join(process.env.HOME, "Library", "Application Support", "homegames") : __dirname;
|
|
730
730
|
}
|
|
731
731
|
case "win32": {
|
|
732
|
-
return path.join(process.env.APPDATA, "homegames");
|
|
732
|
+
return process.env.APPDATA ? path.join(process.env.APPDATA, "homegames") : __dirname;
|
|
733
733
|
}
|
|
734
734
|
case "linux": {
|
|
735
|
-
return path.join(process.env.HOME, ".homegames");
|
|
735
|
+
return process.env.HOME ? path.join(process.env.HOME, ".homegames") : __dirname;
|
|
736
736
|
}
|
|
737
737
|
default: {
|
|
738
738
|
console.log("Unsupported platform!");
|