rem: strcpy(tmp, path); strcat(tmp, file);
add: if (file[0]!='/') { strcpy(tmp, path); strcat(tmp, file); } else strcpy(tmp, file);
context: getCurrentFileName(WMFilePanel *panel){    char *path;    char *file;    char *tmp;    int len;        path = WMGetBrowserPath(panel->browser);        len = strlen(path);    if (path[len-1]=='/') {	file = WMGetTextFieldText(panel->fileField);	tmp = wmalloc(strlen(path)+strlen(file)+8);	strcpy(tmp, path);	strcat(tmp, file);	free(file);	free(path);	return tmp;    } else {	return path;    }}