From 0dcbe81af0aa3c42eff2fa42e9f6bb3fe024c03f Mon Sep 17 00:00:00 2001 From: oznu Date: Fri, 15 May 2020 20:19:40 +1000 Subject: [PATCH] fix #680 --- CHANGELOG.md | 7 ++++++- package-lock.json | 2 +- package.json | 2 +- src/bin/hb-service.ts | 5 +++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93118b491..9f968adc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/). +## Next + +### Bug Fixes + +* **hb-service:** Fix a bug that caused strange behaviour on boot for users with home folders on a remote network share ([#680](https://github.com/oznu/homebridge-config-ui-x/issues/680)) + ## 4.19.0 (2020-05-14) ### Notable Changes @@ -33,7 +39,6 @@ All notable changes to this project will be documented in this file. This projec * **Plugins:** Fixed a bug that prevented the plugins from loading when there was an bad file in the global node_modules directory ([#657](https://github.com/oznu/homebridge-config-ui-x/issues/657)) - ## 4.17.1 (2020-04-29) ### Notable Changes diff --git a/package-lock.json b/package-lock.json index d06fa8a38..6cb9ea124 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "homebridge-config-ui-x", - "version": "4.19.0", + "version": "4.19.1-test.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 52fec52ff..8bdff4405 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "homebridge-config-ui-x", "displayName": "Homebridge Config UI X", - "version": "4.19.0", + "version": "4.19.1-test.2", "description": "A web based management, configuration and control platform for Homebridge", "license": "MIT", "author": "oznu ", diff --git a/src/bin/hb-service.ts b/src/bin/hb-service.ts index 838edb5d7..21f859908 100644 --- a/src/bin/hb-service.ts +++ b/src/bin/hb-service.ts @@ -548,6 +548,11 @@ export class HomebridgeServiceHelper { * Ensures the storage path defined exists */ public async storagePathCheck() { + if (os.platform() === 'darwin' && !await fs.pathExists(path.dirname(this.storagePath))) { + this.logger(`Cannot create Homebridge storage directory, base path does not exist: ${path.dirname(this.storagePath)}`, 'fail'); + process.exit(1); + } + if (!await fs.pathExists(this.storagePath)) { this.logger(`Creating Homebridge directory: ${this.storagePath}`); await fs.mkdirp(this.storagePath);