mirror of https://github.com/keeweb/keeweb.git
fixed macos socket
This commit is contained in:
parent
566e2fb35d
commit
27143e2663
|
@ -303,9 +303,16 @@ const Launcher = {
|
||||||
},
|
},
|
||||||
prepareBrowserExtensionSocket(done) {
|
prepareBrowserExtensionSocket(done) {
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
const dir = this.req('path').dirname(this.getBrowserExtensionSocketName());
|
const sockName = this.getBrowserExtensionSocketName();
|
||||||
const fs = this.req('fs');
|
const fs = this.req('fs');
|
||||||
fs.mkdir(dir, () => done());
|
fs.access(sockName, fs.constants.F_OK, (err) => {
|
||||||
|
if (err) {
|
||||||
|
const dir = this.req('path').dirname(sockName);
|
||||||
|
fs.mkdir(dir, () => done());
|
||||||
|
} else {
|
||||||
|
fs.unlink(sockName, () => done());
|
||||||
|
}
|
||||||
|
});
|
||||||
} else if (process.platform === 'win32') {
|
} else if (process.platform === 'win32') {
|
||||||
done();
|
done();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue