Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 436536 | Differences between
and this patch

Collapse All | Expand All

(-)src/common/text.c (-6 / +4 lines)
Lines 512-517 Link Here
512
	char *fs;
512
	char *fs;
513
	struct tm *tm;
513
	struct tm *tm;
514
	time_t now;
514
	time_t now;
515
	char *xdir;
515
516
516
	if (!netname)
517
	if (!netname)
517
		netname = "NETWORK";
518
		netname = "NETWORK";
Lines 530-543 Link Here
530
	strftime (fnametime, sizeof (fnametime), fname, tm);
531
	strftime (fnametime, sizeof (fnametime), fname, tm);
531
532
532
	/* create final path/filename */
533
	/* create final path/filename */
533
#ifdef WIN32
534
	xdir = get_xdir_utf8 ();
534
	if (fnametime[0] == '/' || (fnametime[0] >= 'A' && fnametime[1] == ':'))
535
	if (!strncmp(fnametime, xdir, strlen(xdir)))
535
#else
536
	if (fnametime[0] == '/')	/* is it fullpath already? */
537
#endif
538
		snprintf (fname, sizeof (fname), "%s", fnametime);
536
		snprintf (fname, sizeof (fname), "%s", fnametime);
539
	else
537
	else
540
		snprintf (fname, sizeof (fname), "%s/xchatlogs/%s", get_xdir_utf8 (), fnametime);
538
		snprintf (fname, sizeof (fname), "%s/xchatlogs/%s", xdir, fnametime);
541
539
542
	/* now we need it in FileSystem encoding */
540
	/* now we need it in FileSystem encoding */
543
	fs = xchat_filename_from_utf8 (fname, -1, 0, 0, 0);
541
	fs = xchat_filename_from_utf8 (fname, -1, 0, 0, 0);

Return to bug 436536