mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 12:42:06 +00:00
fix(blocker): remove the app.isPackaged check (fix #1315)
This commit is contained in:
@ -24,12 +24,7 @@ export const loadAdBlockerEngine = async (
|
|||||||
disableDefaultLists: boolean | unknown[] = false,
|
disableDefaultLists: boolean | unknown[] = false,
|
||||||
) => {
|
) => {
|
||||||
// Only use cache if no additional blocklists are passed
|
// Only use cache if no additional blocklists are passed
|
||||||
let cacheDirectory: string;
|
const cacheDirectory = path.join(app.getPath('userData'), 'adblock_cache');
|
||||||
if (app.isPackaged) {
|
|
||||||
cacheDirectory = path.join(app.getPath('userData'), 'adblock_cache');
|
|
||||||
} else {
|
|
||||||
cacheDirectory = path.resolve(__dirname, 'adblock_cache');
|
|
||||||
}
|
|
||||||
if (!fs.existsSync(cacheDirectory)) {
|
if (!fs.existsSync(cacheDirectory)) {
|
||||||
fs.mkdirSync(cacheDirectory);
|
fs.mkdirSync(cacheDirectory);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user