return (drive_type);
}
-static const gchar*
+static gchar*
get_fstypename (gchar *utfpath)
{
#if defined (PLATFORM_MACOSX) || defined (__linux__)
if (statfs (utfpath, &stat) == -1)
return NULL;
#if PLATFORM_MACOSX
- return stat.f_fstypename;
+ return g_strdup (stat.f_fstypename);
#else
current = &_wapi_drive_types[0];
while (current->drive_type != DRIVE_UNKNOWN) {
if (stat.f_type == current->fstypeid)
- return current->fstype;
+ return g_strdup (current->fstype);
current++;
}
return NULL;
GetVolumeInformation (const gunichar2 *path, gunichar2 *volumename, int volumesize, int *outserial, int *maxcomp, int *fsflags, gunichar2 *fsbuffer, int fsbuffersize)
{
gchar *utfpath;
- const gchar *fstypename;
+ gchar *fstypename;
gboolean status = FALSE;
glong len;
}
if (ret != NULL)
g_free (ret);
+ g_free (fstypename);
}
g_free (utfpath);
return status;