|
|
|
|
@ -168,11 +168,13 @@ class YtDownloaderApp {
|
|
|
|
|
const userHomeDir = homedir();
|
|
|
|
|
const hiddenDir = join(userHomeDir, ".ytDownloader");
|
|
|
|
|
|
|
|
|
|
if (!existsSync(hiddenDir)) {
|
|
|
|
|
try {
|
|
|
|
|
mkdirSync(hiddenDir, {recursive: true});
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.log(error);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let defaultDownloadDir = join(userHomeDir, "Downloads");
|
|
|
|
|
if (platform() === "linux") {
|
|
|
|
|
@ -210,8 +212,11 @@ class YtDownloaderApp {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$(CONSTANTS.DOM_IDS.PATH_DISPLAY).textContent = this.state.downloadDir;
|
|
|
|
|
|
|
|
|
|
if (!existsSync(this.state.downloadDir)) {
|
|
|
|
|
mkdirSync(this.state.downloadDir, {recursive: true});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks localStorage to determine if the tray icon should be used.
|
|
|
|
|
|