[gnome-commander] When creating a gfile with a GnomeCmdCon object, use the given path
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] When creating a gfile with a GnomeCmdCon object, use the given path
- Date: Fri, 27 Aug 2021 18:14:07 +0000 (UTC)
commit 7ecca2d83040c4418cf6715d435b10b5622592ec
Author: Uwe Scholz <u scholz83 gmx de>
Date: Mon Aug 23 00:16:58 2021 +0200
When creating a gfile with a GnomeCmdCon object, use the given path
src/gnome-cmd-con-device.cc | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-cmd-con-device.cc b/src/gnome-cmd-con-device.cc
index 0146a949..c6095898 100644
--- a/src/gnome-cmd-con-device.cc
+++ b/src/gnome-cmd-con-device.cc
@@ -390,13 +390,24 @@ static GnomeVFSURI *dev_create_uri (GnomeCmdCon *con, GnomeCmdPath *path)
}
-static GFile *dev_create_gfile (GnomeCmdCon *con, GnomeCmdPath *unused)
+static GFile *dev_create_gfile (GnomeCmdCon *con, GnomeCmdPath *gnomeCmdPath)
{
g_return_val_if_fail (GNOME_CMD_IS_CON_DEVICE (con), nullptr);
+ GFile *newGFile = nullptr;
GnomeCmdConDevice *dev_con = GNOME_CMD_CON_DEVICE (con);
- return g_mount_get_default_location (dev_con->priv->gMount);
+ if (gnomeCmdPath)
+ {
+ auto gMountGFile = g_mount_get_default_location (dev_con->priv->gMount);
+ newGFile = g_file_get_child (gMountGFile, gnomeCmdPath->get_path());
+ g_object_unref(gMountGFile);
+ }
+ else
+ {
+ newGFile = g_mount_get_default_location (dev_con->priv->gMount);
+ }
+ return newGFile;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]