[gnome-commander] When getting a child path, the actual file or folder might not exist yet. This is okay
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] When getting a child path, the actual file or folder might not exist yet. This is okay
- Date: Sun, 25 Apr 2021 17:06:25 +0000 (UTC)
commit 893b9dc93d27696d402360f876ea2ad8c9180cb6
Author: Uwe Scholz <u scholz83 gmx de>
Date: Sun Apr 25 18:36:55 2021 +0200
When getting a child path, the actual file or folder might not exist yet. This is okay
src/gnome-cmd-dir.cc | 4 ----
src/gnome-cmd-plain-path.cc | 7 -------
2 files changed, 11 deletions(-)
---
diff --git a/src/gnome-cmd-dir.cc b/src/gnome-cmd-dir.cc
index 2a807413..b1af50d6 100644
--- a/src/gnome-cmd-dir.cc
+++ b/src/gnome-cmd-dir.cc
@@ -630,10 +630,6 @@ GnomeVFSURI *gnome_cmd_dir_get_child_uri (GnomeCmdDir *dir, const gchar *filenam
g_return_val_if_fail (GNOME_CMD_IS_DIR (dir), nullptr);
GnomeCmdPath *path = dir->priv->path->get_child(filename);
- if (!path)
- {
- return nullptr;
- }
GnomeVFSURI *uri = gnome_cmd_con_create_uri (dir->priv->con, path);
delete path;
diff --git a/src/gnome-cmd-plain-path.cc b/src/gnome-cmd-plain-path.cc
index 32b1f8da..e0ebb4c5 100644
--- a/src/gnome-cmd-plain-path.cc
+++ b/src/gnome-cmd-plain-path.cc
@@ -64,13 +64,6 @@ GnomeCmdPath *GnomeCmdPlainPath::get_child(const gchar *child)
auto childGFile = g_file_new_for_path(fullPath);
- // It could be that in the meantime the file is deleted again.
- // Therefore we have to check if it really exists.
- if (!g_file_query_exists (childGFile, nullptr))
- {
- g_object_unref(childGFile);
- return nullptr;
- }
gchar *pathString = g_file_get_path(childGFile);
g_object_unref(childGFile);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]