2010/1/7  <[email protected]>:
>
> The recent change to the read logic causes a problem for me.
> Here's a part of my .fvwm2rc:
>
> read .fvwmrc.tile
> read .fvwmrc.mouse
>
> Those really are relative paths...

Indeed -- I am at work, so attaching a patch with this email.  I can't
reproduce the problem myself, but does the patch attached fix it?  If
so, I'll clean it up later.

-- Thomas Adam
Index: fvwm/read.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/fvwm/read.c,v
retrieving revision 1.65
diff -u -r1.65 read.c
--- fvwm/read.c	5 Jan 2010 19:34:39 -0000	1.65
+++ fvwm/read.c	7 Jan 2010 15:29:05 -0000
@@ -203,15 +203,16 @@
 int run_command_file(
 	char *filename, const exec_context_t *exc)
 {
-	char *full_filename;
-	FILE* f;
+	char *full_filename = NULL;
+	FILE* f = NULL;
 
 	if (filename[0] == '.' || filename[0] == '/')
 	{             /* if absolute path */
 		f = fopen(filename,"r");
 		full_filename = filename;
 	}
-	else
+	
+	if (f == NULL)
 	{             /* else its a relative path */
 		full_filename = CatString3(fvwm_userdir, "/", filename);
 		f = fopen(full_filename, "r");
@@ -222,6 +223,7 @@
 			f = fopen(full_filename, "r");
 		}
 	}
+
 	if (f == NULL)
 	{
 		return 0;

Reply via email to