mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01: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:
		| @@ -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 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user