"Damjan Jovanovic" damjan.jov@gmail.com writes:
char dir_file_name[MAX_PATH];
struct stat st;
name[i] = 0;
fprintf(tempfile, " <Menu>\n");
fprintf(tempfile, " <Name>%s%s</Name>\n", count ? "" : "wine-", name);
fprintf(tempfile, " <Directory>%s%s.directory</Directory>\n", count ? "" : "wine-", name);
snprintf(dir_file_name, sizeof(dir_file_name), "%s/desktop-directories/%s%s.directory",
xdg_data_dir, count ? "" : "wine-", name);
You still have a MAX_PATH buffer here for a Unix file name.