Hmmm, I just got hit by this whilst trying to fix ntfs-3g mounting in
Jaunty. I'm pretty sure it's not a Nautilus bug, but I'm not sure if it
is in gvfs or glib. The actual error comes from gvfs, and I think Tormod
is probably right about this being a race condition.
The actual code that does the mounting seems to be in
daemon/gvfsbackendcomputer.c, here:
static void
mount_volume_from_drive (GDrive *drive,
GVfsJob *job,
GMountOperation *mount_op)
{
GList *volumes;
GVolume *volume;
volumes = g_drive_get_volumes (drive);
if (volumes)
{
volume = G_VOLUME (volumes->data);
g_volume_mount (volume,
0,
mount_op,
G_VFS_JOB (job)->cancellable,
mount_volume_cb,
job);
}
else
{
g_vfs_job_failed (G_VFS_JOB (job), G_IO_ERROR,
G_IO_ERROR_NOT_SUPPORTED,
_("Can't mount file"));
}
g_list_foreach (volumes, (GFunc)g_object_unref, NULL);
g_list_free (volumes);
}
The error message actually comes from the callback "mount_volume_cb":
static void
mount_volume_cb (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
GVfsJobMountMountable *job = user_data;
GError *error;
GMount *mount;
GVolume *volume;
GFile *root;
char *uri;
volume = G_VOLUME (source_object);
/* TODO: We're leaking the GMountOperation here */
error = NULL;
if (g_volume_mount_finish (volume, res, &error))
{
mount = g_volume_get_mount (volume);
if (mount)
{
root = g_mount_get_root (mount);
uri = g_file_get_uri (root);
g_vfs_job_mount_mountable_set_target_uri (job,
uri,
FALSE);
g_free (uri);
g_object_unref (root);
g_object_unref (mount);
g_vfs_job_succeeded (G_VFS_JOB (job));
}
else
g_vfs_job_failed (G_VFS_JOB (job), G_IO_ERROR,
G_IO_ERROR_FAILED,
_("Internal error: %s"), "No mount object for mounted
volume");
}
else
{
g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
g_error_free (error);
}
}
So, g_volume_get_mount returns NULL (not mounted) after
g_volume_mount_finish was already called successfully.
--
Unable to mount location -- Internal error: No mount object for mounted volume
https://bugs.launchpad.net/bugs/256749
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.
--
desktop-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs