More on tilde expansion
Leonard den Ottolander
leonard at den.ottolander.nl
Mon Sep 13 14:07:57 UTC 2004
Hi,
Getting slightly frustrated that this seemingly simple issue turns out
to be so hard to solve.
I did verify that tilde_expand() returns correct values. Still for some
reason the following patch (only affects copy of a single
file/directory) does not work correctly for files/directories that do
not contain a slash in the name. Ie ~/[path] and ~leonard/[path] work
correctly, but not ~ and ~leonard. It is just as if tilde_expand is not
called in such cases. I am totally clueless. Anyone care to shed some
light?
--- src/file.c.000 2004-09-10 15:06:59.000000000 +0200
+++ src/file.c 2004-09-10 17:32:25.000000000 +0200
@@ -1865,6 +1865,9 @@ panel_operate (void *source_panel, FileO
g_free (dest);
return 0;
}
+ char *tmpdest = dest;
+ dest = tilde_expand(tmpdest);
+ g_free(tmpdest);
}
#ifdef WITH_BACKGROUND
/* Did the user select to do a background operation? */
Leonard.
--
mount -t life -o ro /dev/dna /genetic/research
More information about the mc-devel
mailing list