Skip to content

Commit

Permalink
Merge pull request #60 from ggchivalrous/feat/v1.5
Browse files Browse the repository at this point in the history
chore: 修改window下exiftool工具名称
  • Loading branch information
ggchivalrous authored Mar 25, 2024
2 parents c52a4eb + 0e34c79 commit 4f9e930
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion electron/src/path.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { join } from 'node:path';
import os from 'os';

import { app } from 'electron';

Expand All @@ -11,7 +12,7 @@ const paths = {
public: env.VITE_PUBLIC,
logger: join(app.getPath('userData'), 'logs'),
logo: '',
exiftool: join(isDev ? env.VITE_DIST_ELECTRON : app.getAppPath(), 'exiftool/exiftool'),
exiftool: join(isDev ? env.VITE_DIST_ELECTRON : app.getAppPath(), 'exiftool', os.platform() === 'win32' ? 'exiftool.exe' : 'exiftool'),
};

paths.public = isDev ? env.VITE_PUBLIC : paths.web;
Expand Down
2 changes: 1 addition & 1 deletion scripts/install-exiftool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function installWinExiftool(outDir: string) {
tryCatch(() => {
const admzip = new AdmZip(WindowsExifToolPath);
admzip.extractAllTo(outDir);
fs.renameSync(path.join(outDir, 'exiftool(-k).exe'), path.join(outDir, 'exiftool'));
fs.renameSync(path.join(outDir, 'exiftool(-k).exe'), path.join(outDir, 'exiftool.exe'));
r(true);
}, null, () => r(false));

Expand Down

0 comments on commit 4f9e930

Please sign in to comment.