mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-02-24 09:01:09 -08:00
fix: for file path, use openPath instead of openExternal
This commit is contained in:
parent
1e5c2eabe4
commit
aede39f114
1 changed files with 5 additions and 2 deletions
|
|
@ -19,9 +19,12 @@ export function handleOpenFileExternalLink(nextUrl: string): INewWindowAction |
|
|||
const absoluteFilePath = nativeService.formatFileUrlToAbsolutePath(nextUrl);
|
||||
const fileStat = fs.statSync(absoluteFilePath);
|
||||
if (fileStat.isDirectory()) {
|
||||
void shell.openExternal(absoluteFilePath);
|
||||
} else if (fileStat.isFile()) {
|
||||
logger.info(`Opening directory ${absoluteFilePath}`, { function: 'handleOpenFileExternalLink' });
|
||||
void shell.openPath(absoluteFilePath);
|
||||
} else if (fileStat.isFile()) {
|
||||
logger.info(`Opening file ${absoluteFilePath}`, { function: 'handleOpenFileExternalLink' });
|
||||
void shell.openPath(absoluteFilePath);
|
||||
// void shell.openExternal(absoluteFilePath);
|
||||
}
|
||||
return {
|
||||
action: 'deny',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue