Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	package.json
#	src/lib/helpers/getTmp.js
#	src/middleware/buildGame.js
  • Loading branch information
chrismaltby committed Jun 25, 2019
2 parents 70f949a + 2ec8619 commit 1f39a48
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/lib/helpers/getTmp.js
@@ -1,12 +1,17 @@
import { remote } from "electron";
import fs from "fs-extra";

export default () => {
const tmpPath = remote.app.getPath("temp");
if (tmpPath.indexOf(" ") === -1) {
return tmpPath;
}
if (process.platform === "win32") {
return "C:\tmp";
}
return "/tmp";
let tmpPath = remote.app.getPath("temp");
if (
tmpPath.indexOf(" ") === -1 &&
tmpPath.indexOf(".itch") === -1 &&
(process.platform !== "win32" || tmpPath.length < 35)
) {
// Ok
} else if (process.platform === "win32") {
tmpPath = "C:\\tmp";
} else tmpPath = "/tmp";
fs.ensureDirSync(tmpPath);
return tmpPath;
};

0 comments on commit 1f39a48

Please sign in to comment.