Custom .zshrc file is ~/.local/share/mc/.zshrc.
If ZDOTDIR environment variable is not set, set it to ~/.local/share/mc
if a .zshrc is found there. It is the only way to point zsh to an other
rc file than the default.
Thanks Sebastian Gniazdowski <sgniazdowski@gmail.com> for the original
patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...because the pointer can't be NULL.
Found by Coverity.
Coverity id #110817.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Save file handle for later close, if valid.
Found by Coverity.
Coverity id #32607.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
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>
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>
In Solaris 11.4 SPARC, TIOCSWINSZ is defined in termios.h.
lib/tty/tty.c: add #include <termios.h>, because TIOCSWINSZ is used in
tty_resize().
Thanks Alexander <shurik005@gmail.com> for the fix.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* (complete): rename to input_complete() and move declaration to
input.h.
* input_complete.h: remove.
* (input_free_completions): rename to input_complete_free() and move
definition to input_complete.c.
* lib/widget/input_complete.c: rename variables and function from
query_* to complete_*.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>