mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
Strip trailing backslash
%~dp0 always contains a trailing backslash. The way %DIR% is used in the following line, the trailing slash should be stripped. Alternatively, `%DIR%\\` may be replaced with `%DIR%`, but I would advice against. It is ok to have `%~dp0trilium-data`, which is a conventional pattern. Once %~dp0 is replaced with %DIR% (which is not really warranted here), stripping the trailing slash right after assignment is preferable.
This commit is contained in:
parent
4971619b69
commit
df9a413ef8
@ -15,6 +15,7 @@ chcp 65001
|
|||||||
|
|
||||||
:: Get Current Trilium executable directory and compute data directory
|
:: Get Current Trilium executable directory and compute data directory
|
||||||
SET DIR=%~dp0
|
SET DIR=%~dp0
|
||||||
|
SET DIR=%DIR:~0,-1%
|
||||||
SET TRILIUM_DATA_DIR=%DIR%\trilium-data
|
SET TRILIUM_DATA_DIR=%DIR%\trilium-data
|
||||||
cd "%DIR%"
|
cd "%DIR%"
|
||||||
start trilium.exe
|
start trilium.exe
|
||||||
|
Loading…
x
Reference in New Issue
Block a user