* Fixed -c behaviour. Sometimes apps open "$PWD/file" when asked to

simply open "file" (eg. eog).
This commit is contained in:
Sam Hocevar
2007-01-13 10:59:07 +00:00
committed by sam
parent 1bd6bb7a23
commit 7d8c22ecef
+5 -1
View File
@@ -379,9 +379,13 @@ static void loop_stdin(void)
static char *merge_file(char *regex, char *file)
{
char *newfile = malloc(1 + 2 * strlen(file) + 1 + 1), *tmp = newfile;
char *newfile = malloc(5 + 2 * strlen(file) + 1 + 1), *tmp = newfile;
*tmp++ = '(';
*tmp++ = '^';
*tmp++ = '|';
*tmp++ = '/';
*tmp++ = ')';
while(*file)
{
if(strchr("^.[$()|*+?{\\", *file))