summaryrefslogtreecommitdiffstats
path: root/lib/vfs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vfs')
-rw-r--r--lib/vfs/Makefile.in2
-rw-r--r--lib/vfs/direntry.c2
-rw-r--r--lib/vfs/gc.c2
-rw-r--r--lib/vfs/interface.c2
-rw-r--r--lib/vfs/netutil.c2
-rw-r--r--lib/vfs/parse_ls_vga.c4
-rw-r--r--lib/vfs/path.c30
-rw-r--r--lib/vfs/utilvfs.c2
-rw-r--r--lib/vfs/vfs.c2
-rw-r--r--lib/vfs/vfs.h4
-rw-r--r--lib/vfs/xdirentry.h2
11 files changed, 29 insertions, 25 deletions
diff --git a/lib/vfs/Makefile.in b/lib/vfs/Makefile.in
index bf588f9..91ac02a 100644
--- a/lib/vfs/Makefile.in
+++ b/lib/vfs/Makefile.in
@@ -135,7 +135,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4.include/vfs/mc-vfs-sfs.m4 \
$(top_srcdir)/m4.include/vfs/mc-vfs-ftp.m4 \
$(top_srcdir)/m4.include/vfs/mc-vfs-sftp.m4 \
- $(top_srcdir)/m4.include/vfs/mc-vfs-fish.m4 \
+ $(top_srcdir)/m4.include/vfs/mc-vfs-shell.m4 \
$(top_srcdir)/m4.include/vfs/mc-vfs-undelfs.m4 \
$(top_srcdir)/m4.include/vfs/mc-vfs-tarfs.m4 \
$(top_srcdir)/m4.include/vfs/mc-vfs-cpiofs.m4 \
diff --git a/lib/vfs/direntry.c b/lib/vfs/direntry.c
index 32b8594..5f9a8ef 100644
--- a/lib/vfs/direntry.c
+++ b/lib/vfs/direntry.c
@@ -1,7 +1,7 @@
/*
Directory cache support
- Copyright (C) 1998-2023
+ Copyright (C) 1998-2024
Free Software Foundation, Inc.
Written by:
diff --git a/lib/vfs/gc.c b/lib/vfs/gc.c
index 0914b75..6c5deb0 100644
--- a/lib/vfs/gc.c
+++ b/lib/vfs/gc.c
@@ -1,7 +1,7 @@
/*
Virtual File System garbage collection code
- Copyright (C) 2003-2023
+ Copyright (C) 2003-2024
Free Software Foundation, Inc.
Written by:
diff --git a/lib/vfs/interface.c b/lib/vfs/interface.c
index 1b2de26..545dd1d 100644
--- a/lib/vfs/interface.c
+++ b/lib/vfs/interface.c
@@ -1,7 +1,7 @@
/*
Virtual File System: interface functions
- Copyright (C) 2011-2023
+ Copyright (C) 2011-2024
Free Software Foundation, Inc.
Written by:
diff --git a/lib/vfs/netutil.c b/lib/vfs/netutil.c
index 1306879..3f31d46 100644
--- a/lib/vfs/netutil.c
+++ b/lib/vfs/netutil.c
@@ -1,7 +1,7 @@
/*
Network utilities for the Midnight Commander Virtual File System.
- Copyright (C) 1995-2023
+ Copyright (C) 1995-2024
Free Software Foundation, Inc.
This file is part of the Midnight Commander.
diff --git a/lib/vfs/parse_ls_vga.c b/lib/vfs/parse_ls_vga.c
index 779792f..dcb82be 100644
--- a/lib/vfs/parse_ls_vga.c
+++ b/lib/vfs/parse_ls_vga.c
@@ -1,7 +1,7 @@
/*
Routines for parsing output from the 'ls' command.
- Copyright (C) 1988-2023
+ Copyright (C) 1988-2024
Free Software Foundation, Inc.
Copyright (C) 1995, 1996 Miguel de Icaza
@@ -49,7 +49,7 @@
/*** file scope macro definitions ****************************************************************/
-/* Parsing code is used by ftpfs, fish and extfs */
+/* Parsing code is used by ftpfs, shell and extfs */
#define MAXCOLS 30
/*** file scope type declarations ****************************************************************/
diff --git a/lib/vfs/path.c b/lib/vfs/path.c
index c599e25..85faa9a 100644
--- a/lib/vfs/path.c
+++ b/lib/vfs/path.c
@@ -1,7 +1,7 @@
/*
Virtual File System path handlers
- Copyright (C) 2011-2023
+ Copyright (C) 2011-2024
Free Software Foundation, Inc.
Written by:
@@ -546,13 +546,12 @@ vfs_path_tokens_add_class_info (const vfs_path_element_t * element, GString * re
g_string_append (ret_tokens, VFS_PATH_URL_DELIMITER);
url_str = vfs_path_build_url_params_str (element, TRUE);
- if (url_str->len != 0)
+ if (url_str != NULL)
{
g_string_append_len (ret_tokens, url_str->str, url_str->len);
g_string_append_c (ret_tokens, PATH_SEP);
+ g_string_free (url_str, TRUE);
}
-
- g_string_free (url_str, TRUE);
}
#ifdef HAVE_CHARSET
@@ -663,13 +662,12 @@ vfs_path_to_str_flags (const vfs_path_t * vpath, int elements_count, vfs_path_fl
g_string_append (buffer, VFS_PATH_URL_DELIMITER);
url_str = vfs_path_build_url_params_str (element, !(flags & VPF_STRIP_PASSWORD));
- if (url_str->len != 0)
+ if (url_str != NULL)
{
g_string_append_len (buffer, url_str->str, url_str->len);
g_string_append_c (buffer, PATH_SEP);
+ g_string_free (url_str, TRUE);
}
-
- g_string_free (url_str, TRUE);
}
#ifdef HAVE_CHARSET
@@ -1514,7 +1512,7 @@ vfs_path_vtokens_get (const vfs_path_t * vpath, ssize_t start_position, ssize_t
* @param element path element
* @param keep_password TRUE or FALSE
*
- * @return newly allocated string
+ * @return newly allocated non-empty string or NULL
*/
GString *
@@ -1553,7 +1551,11 @@ vfs_path_build_url_params_str (const vfs_path_element_t * element, gboolean keep
g_string_append_printf (buffer, "%d", element->port);
}
- return buffer;
+ if (buffer->len != 0)
+ return buffer;
+
+ g_string_free (buffer, TRUE);
+ return NULL;
}
/* --------------------------------------------------------------------------------------------- */
@@ -1574,14 +1576,16 @@ vfs_path_element_build_pretty_path_str (const vfs_path_element_t * element)
g_string_append (pretty_path, VFS_PATH_URL_DELIMITER);
url_params = vfs_path_build_url_params_str (element, FALSE);
- g_string_append_len (pretty_path, url_params->str, url_params->len);
- g_string_free (url_params, TRUE);
+ if (url_params != NULL)
+ {
+ g_string_append_len (pretty_path, url_params->str, url_params->len);
+ g_string_free (url_params, TRUE);
+ }
if (!IS_PATH_SEP (*element->path))
g_string_append_c (pretty_path, PATH_SEP);
- g_string_append (pretty_path, element->path);
- return pretty_path;
+ return g_string_append (pretty_path, element->path);
}
/* --------------------------------------------------------------------------------------------- */
diff --git a/lib/vfs/utilvfs.c b/lib/vfs/utilvfs.c
index 162eb4c..0356832 100644
--- a/lib/vfs/utilvfs.c
+++ b/lib/vfs/utilvfs.c
@@ -1,7 +1,7 @@
/*
Utilities for VFS modules.
- Copyright (C) 1988-2023
+ Copyright (C) 1988-2024
Free Software Foundation, Inc.
Copyright (C) 1995, 1996 Miguel de Icaza
diff --git a/lib/vfs/vfs.c b/lib/vfs/vfs.c
index ad57189..18d15ed 100644
--- a/lib/vfs/vfs.c
+++ b/lib/vfs/vfs.c
@@ -1,7 +1,7 @@
/*
Virtual File System switch code
- Copyright (C) 1995-2023
+ Copyright (C) 1995-2024
Free Software Foundation, Inc.
Written by: 1995 Miguel de Icaza
diff --git a/lib/vfs/vfs.h b/lib/vfs/vfs.h
index ee78ff5..260e8f3 100644
--- a/lib/vfs/vfs.h
+++ b/lib/vfs/vfs.h
@@ -68,7 +68,7 @@
#endif
#ifdef EREMOTEIO
-#define E_REMOTE EREMOTEIO /* if other side of ftp/fish reports error */
+#define E_REMOTE EREMOTEIO /* if other side of ftp/shell reports error */
#else
#define E_REMOTE ENETUNREACH /* :-( there's no EREMOTEIO on some systems */
#endif
@@ -133,7 +133,7 @@ typedef struct vfs_class
{
const char *name; /* "FIles over SHell" */
vfs_flags_t flags;
- const char *prefix; /* "fish:" */
+ const char *prefix; /* "shell:" */
int verrno; /* can't use errno because glibc2 might define errno as function */
gboolean flush; /* if set to TRUE, invalidate directory cache */
FILE *logfile;
diff --git a/lib/vfs/xdirentry.h b/lib/vfs/xdirentry.h
index e1244cb..9424658 100644
--- a/lib/vfs/xdirentry.h
+++ b/lib/vfs/xdirentry.h
@@ -109,7 +109,7 @@ typedef struct
} vfs_file_handler_t;
/*
- * One of our subclasses (tar, cpio, fish, ftpfs) with data and methods.
+ * One of our subclasses (tar, cpio, shell, ftpfs) with data and methods.
* Extends vfs_class.
*/
struct vfs_s_subclass