In the function vfs_expire(), curr_time and exp_time are declared
guint64. curr_time is initialised with a timestamp and exp_time
with this timestamp minus vfs_timeout seconds. Later there is if
(stamping->time <= exp_time). Prior to commit
a94dd7d2de curr_time was initialised with
a value larger than vfs_timeout seconds, so everything was fine. This
commit changed the initialisation to a timer starting when mc is
started. So for the first vfs_timeout seconds, the result of the
subtraction is negative, but it is a guint64, so we just get a VERY
large unsigned value and the if (stamping->time <= exp_time) is always
true. So mc thinks the vfs hasn't been used recently and goes into an
infinite loop.
If one opens a .rpm file with mc and goes into the CONTENTS.cpio and
then tries to go into the .tar.gz there (this is the usual structure of
a .rpm) after waiting vfs_timeout seconds, everything is fine. However,
before vfs_timeout seconds, mc hangs.
Solution: use g_get_real_time() instead of mc_timer_elapsed().
Thanks nvwarr at hotmail.com for finding out the reason for this bug.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 4145_long_file_names:
WTree: get rid of file name limitation in quick search.
WPanel: get rid of file name limitation in quick search.
(mc_g_string_copy): new API that extends GString one.
(string_file_name): get rid of file name length limitation.
Ticket #4145: file names longer than 255 bytes are not supported.
Avoid limitation of file name length.
(vfs_dirent): redefined to use instead of standard "struct direct"
to hold file name of any length.
(vfs_class::readdir): return newly allocated vfs_dirent structure.
Related changes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This bug was introduced in 2e734e5618.
(dlg_handle_key): fallback to dialog_map if shortcut is not defined in
filemanager/editor/viewer/diffviewer key map.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This can be used for running a clipboard script (from a virtual terminal)
that autodetects (or requests from sytemctl) the proper values of DISPLAY
and XAUTHORITY without the need of exporting these variables to the whole
virtual terminal session.
(clipboard_file_to_ext_clip): don't test DISPLAY environment variable.
(clipboard_file_from_ext_clip): likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 4077_extfs_leading_got_slash:
tests: extfs/zip: file names with leading space or dash.
Revert "urar extfs: don't start path with ./ in file list."
extfs/uzip: add leading ./ to file name
Ticket #4077: extfs: handle file names started with dash or space.
* (extfs_open_archive): skip leading ./ in file names. extfs plug-ins
are added leading ./ to handle files with name started with space.
* (extfs_cmd): skip leading ./ added in name_quote(). ./ is added to
handle files with name started with dash.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 4103_cleanup: (23 commits)
src/subshell/common.c: clarify author list.
iso9660.in: use grep directly.
src/filemanager/chattr.c: support dax attribute.
m4.include/gnulib/stat-size.m4: shorten https://lists.gnu.org/archive/html/... link.
m4.include/gnulib/fsusage.m4: produce more regular configure output.
src/filemanager/find.c: use g_get_real_time() instead of gettimeofday().
mc_timer: use g_get_real_time() instead of gettimeofday().
(do_view_cmd): rename parameter.
(view_file): rename parameter in function declaration.
(show_editor_viewer_history): fix call of view_file().
Remove one-line header files.
Sync with gnulib 85d1d48f6fa89de6a5de9e7794bda3255f0f32aa.
Remove Cray support.
Optimize comparisions in file sort functions.
src/filemanager/boxes.c: rename variables.
WPanel: reorder fields.
WPanel: rename "panel_name" fileld to "name".
WPanel: change type of "active" and "dirty" fields to gboolean.
WPanel: use structure for quick search fields.
WPanel: use structure for directory history fields.
...
Sync with gnulib 2a3dbe99a2aeb058ecb033d7d830e6600e16c91c.
/archive/html/ part can be replace with /r/.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Sync with gnulib 875dff5812cb9de949727e1aa399a06b07a886a9.
Remove AC_MSG_CHECKING without corresponding AC_MSG_RESULT.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Move declaration of {advanced_chown,chattr,chmod,chown}_cmd() into cmd.h.
Delete src/filemanager/{achown,chattr,chmod,chown}.h
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Fix quoting of AC_LANG_PROGRAM arguments.
* m4.include/gnulib//mountlist.m4 (gl_MOUNTLIST): Quote the
AC_LANG_PROGRAM arguments through [[...]].
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
call 'file' with -z switch to enable getting the type of compressed files,
and use that capability extensively.
the /logs?/ hacks in ext.d/text.sh need to remain for the time being, as
file -z doesn't handle .lz4 files as encapsulated content.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 4126_persistent_subshell_command_buffer_fixups:
Disable subshell cursor position translation for bash v5+.
Optimize bash cursor position translation.
Make query of subshell command buffer leading-dash-safe.
Prevent word-splitting of the subshell command buffer.
Fixup FISH subshell setup.
Do not avoid big stack allocations.
Ticket #4126: fixups to persistent subshell command line buffer support.