cfc943f
--- mc-4.6.1a/src/util.c.jn	2005-12-02 11:08:26.000000000 +0100
cfc943f
+++ mc-4.6.1a/src/util.c	2005-12-02 13:11:19.000000000 +0100
cfc943f
@@ -1515,9 +1515,16 @@
cfc943f
 
cfc943f
 /* If filename is NULL, then we just append PATH_SEP to the dir */
cfc943f
 char *
cfc943f
-concat_dir_and_file (const char *dir, const char *file)
cfc943f
+concat_dir_and_file (const char *dir, const char *filename)
cfc943f
 {
cfc943f
     int i = strlen (dir);
cfc943f
+    const char *file = filename;
cfc943f
+    
cfc943f
+    /* Return filename when dir is empty */
cfc943f
+    if (!i) return g_strdup (filename);
cfc943f
+    
cfc943f
+    if (file != NULL && *file == PATH_SEP)
cfc943f
+    	file++;
cfc943f
     
cfc943f
     if (dir [i-1] == PATH_SEP)
cfc943f
 	return  g_strconcat (dir, file, (char *) NULL);