mirror of https://github.com/mifi/lossless-cut
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
749 B
Diff
25 lines
749 B
Diff
diff --git a/node_modules/conf/index.js b/node_modules/conf/index.js
|
|
index c4daca9..52254f1 100644
|
|
--- a/node_modules/conf/index.js
|
|
+++ b/node_modules/conf/index.js
|
|
@@ -176,7 +176,18 @@ class Conf {
|
|
if (process.env.SNAP) {
|
|
fs.writeFileSync(this.path, data);
|
|
} else {
|
|
- writeFileAtomic.sync(this.path, data);
|
|
+ try {
|
|
+ writeFileAtomic.sync(this.path, data);
|
|
+ } catch (error) {
|
|
+ // Fix for https://github.com/sindresorhus/electron-store/issues/106
|
|
+ // Sometimes on Windows, we will get an EXDEV error when atomic writing
|
|
+ // (even though to the same directory), so we fall back to non atomic write
|
|
+ if (error.code !== 'EXDEV') {
|
|
+ throw error;
|
|
+ }
|
|
+
|
|
+ fs.writeFileSync(this.path, data);
|
|
+ }
|
|
}
|
|
}
|
|
|