mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-02 10:32:07 -04:00
Fix: Expand tilde from config paths (#2242)
* Expand tilde to the home directory for paths from config * Remove extra line
This commit is contained in:
@@ -23,7 +23,9 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function expandTilde(path: string): string {
|
function expandTilde(path: string): string {
|
||||||
return strip(path.replace("~", stringify(root.home)));
|
if (!path.startsWith("~"))
|
||||||
|
return path;
|
||||||
|
return strip(root.home) + path.substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function shortenHome(path: string): string {
|
function shortenHome(path: string): string {
|
||||||
|
|||||||
@@ -1100,7 +1100,7 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadCustomThemeFromFile(filePath) {
|
function loadCustomThemeFromFile(filePath) {
|
||||||
customThemeFileView.path = filePath;
|
customThemeFileView.path = Paths.expandTilde(filePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
function reloadCustomThemeVariant() {
|
function reloadCustomThemeVariant() {
|
||||||
@@ -1749,6 +1749,7 @@ Singleton {
|
|||||||
|
|
||||||
FileView {
|
FileView {
|
||||||
id: customThemeFileView
|
id: customThemeFileView
|
||||||
|
blockLoading: false
|
||||||
watchChanges: currentTheme === "custom"
|
watchChanges: currentTheme === "custom"
|
||||||
|
|
||||||
function parseAndLoadTheme() {
|
function parseAndLoadTheme() {
|
||||||
|
|||||||
Reference in New Issue
Block a user