mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-01-12 04:11:02 -08:00
fix: ignore empty path
This commit is contained in:
parent
66894a870c
commit
c9284ec3c1
1 changed files with 4 additions and 0 deletions
|
|
@ -50,6 +50,10 @@ export class NativeService implements INativeService {
|
|||
}
|
||||
|
||||
public async openPath(filePath: string): Promise<void> {
|
||||
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
||||
if (!filePath.trim()) {
|
||||
return;
|
||||
}
|
||||
logger.debug(`NativeService.openPath() Opening ${filePath}`);
|
||||
// TODO: add a switch that tell user these are dangerous features, use at own risk.
|
||||
if (path.isAbsolute(filePath)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue