Last active
August 29, 2015 14:15
-
-
Save Ram-Z/f0e8b9329415b01276cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/qutebrowser/config/configtypes.py b/qutebrowser/config/configtypes.py | |
index 69f22f0..4dbcb5c 100644 | |
--- a/qutebrowser/config/configtypes.py | |
+++ b/qutebrowser/config/configtypes.py | |
@@ -837,6 +837,7 @@ class Directory(BaseType): | |
return | |
else: | |
raise configexc.ValidationError(value, "may not be empty!") | |
+ value = os.path.expandvars(value) | |
value = os.path.expanduser(value) | |
if not os.path.isdir(value): | |
raise configexc.ValidationError(value, "must be a valid " | |
@@ -847,6 +848,7 @@ class Directory(BaseType): | |
def transform(self, value): | |
if not value: | |
return None | |
+ value = os.path.expandvars(value) | |
return os.path.expanduser(value) | |
@@ -1147,7 +1149,8 @@ class UserStyleSheet(File): | |
raise configexc.ValidationError(value, "must be a valid file!") | |
def transform(self, value): | |
- path = os.path.expanduser(value) | |
+ path = os.path.expandvars(value) | |
+ path = os.path.expanduser(path) | |
if not value: | |
return None | |
elif os.path.isabs(path): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment