Tilde expansion in mkdir dialog



Hi,

the new tilde expansion behaviour seems a bit
ambiguous in make dir dialog (F7).

I would like to create directory named '~', but
this gets expanded to my home directory, which
exist.

Now, I would like to create /home/mylogin/dir
and input '~/dir' and here i want the expansion.

Creation of '~' should be treated differently.

(Well, I don't create directories '~' every day.)


There is a bug in tilde expansion function:
1. try to create directory '~nonexistent'
2. shis should stay as-is, so I expect creation
   of directory' ~nonexistent'
3. but only the directory 'nonexistent' is created


Variable holding the directory name skips initial '~'
but does not restore it back when returning nonexistent
entry in passwd.

patch:
--- utilunix.c.orig     Fri Nov 28 11:45:57 2003
+++ utilunix.c  Fri Nov 28 11:46:03 2003
@@ -290,7 +290,7 @@

     /* If we can't figure the user name, leave tilde unexpanded */
     if (!passwd)
-       return g_strdup (directory);
+       return g_strdup (directory-1);

     return g_strconcat (passwd->pw_dir, PATH_SEP_STR, p, NULL);
 }


bye
Dave



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]