Skip to content

Commit

Permalink
Make it shut up
Browse files Browse the repository at this point in the history
  • Loading branch information
asportnoy committed Aug 17, 2023
1 parent aea5588 commit ef6aa09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/inject/platforms/win32.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { join, localDataDir } from "@tauri-apps/api/path";
import { DiscordPlatform } from "../../types";
import { listDir } from "../../util";
import { exists, listDir } from "../../util";

const PATHS: Record<DiscordPlatform, string> = {
stable: "Discord",
Expand All @@ -12,6 +12,7 @@ const PATHS: Record<DiscordPlatform, string> = {
export const getAppDir = async (platform: DiscordPlatform): Promise<string | null> => {
const localAppData = await localDataDir();
const discordPath = await join(localAppData, PATHS[platform]);
if (!(await exists(discordPath))) return null;
const discordDirectory = await listDir(discordPath);

const currentBuild = discordDirectory.filter((path) => path?.startsWith("app-")).reverse()[0];
Expand Down

0 comments on commit ef6aa09

Please sign in to comment.