Index: src/common/text.c =================================================================== --- src/common/text.c (revision 1511) +++ src/common/text.c (working copy) @@ -512,6 +512,7 @@ char *fs; struct tm *tm; time_t now; + char *xdir; if (!netname) netname = "NETWORK"; @@ -530,14 +531,11 @@ strftime (fnametime, sizeof (fnametime), fname, tm); /* create final path/filename */ -#ifdef WIN32 - if (fnametime[0] == '/' || (fnametime[0] >= 'A' && fnametime[1] == ':')) -#else - if (fnametime[0] == '/') /* is it fullpath already? */ -#endif + xdir = get_xdir_utf8 (); + if (!strncmp(fnametime, xdir, strlen(xdir))) snprintf (fname, sizeof (fname), "%s", fnametime); else - snprintf (fname, sizeof (fname), "%s/xchatlogs/%s", get_xdir_utf8 (), fnametime); + snprintf (fname, sizeof (fname), "%s/xchatlogs/%s", xdir, fnametime); /* now we need it in FileSystem encoding */ fs = xchat_filename_from_utf8 (fname, -1, 0, 0, 0);