[gnome-commander] Stop creating relative directory already at ".."
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Stop creating relative directory already at ".."
- Date: Tue, 12 Oct 2021 21:43:29 +0000 (UTC)
commit 37a31074187046c7c4750029456ba70610e577a7
Author: Uwe Scholz <u scholz83 gmx de>
Date: Tue Oct 12 23:43:11 2021 +0200
Stop creating relative directory already at ".."
src/dialogs/gnome-cmd-mkdir-dialog.cc | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-mkdir-dialog.cc b/src/dialogs/gnome-cmd-mkdir-dialog.cc
index b3dae623..17f74c7d 100644
--- a/src/dialogs/gnome-cmd-mkdir-dialog.cc
+++ b/src/dialogs/gnome-cmd-mkdir-dialog.cc
@@ -68,18 +68,21 @@ GSList *make_gfile_list (GnomeCmdDir *dir, string filename)
GSList *gFile_list = NULL;
if (g_path_is_absolute (filename.c_str()))
+ {
while (filename.compare("/") != 0)
{
gFile_list = g_slist_prepend (gFile_list, gnome_cmd_dir_get_absolute_path_gfile (dir, filename));
stringify (filename, g_path_get_dirname (filename.c_str()));
}
+ }
else
- while (filename.compare(".") != 0)
+ {
+ while (filename.compare("..") != 0 && filename.compare(".") != 0)
{
gFile_list = g_slist_prepend (gFile_list, gnome_cmd_dir_get_child_gfile (dir, filename.c_str()));
stringify (filename, g_path_get_dirname (filename.c_str()));
}
-
+ }
return gFile_list;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]