summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/file.c b/file.c
index 20189a3e6a..2865ef6899 100644
--- a/file.c
+++ b/file.c
@@ -1188,7 +1188,11 @@ file_s_expand_path(obj, fname)
p = buf;
if (s[0] == '~') {
- if (s[1] == '/' || s[1] == '\0') {
+ if (s[1] == '/' ||
+#if defined(MSDOS) || defined(NT) || defined(__human68k__)
+ s[1] == '\\' ||
+#endif
+ s[1] == '\0') {
char *dir = getenv("HOME");
if (!dir) {