* (file_progress_show_deleting): take 'vfs_path_t *' instead of 'char *'.
* (try_erase_dir): likewise.
* (erase_file): sync with new file_progress_show_deleting().
* (recursive_erase): sync with new file_progress_show_deleting() and
try_erase_dir().
* (erase_dir_iff_empty): likewise.
* (erase_dir): likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The upcoming fish 3.8 will add a feature flag to officially deprecate
"%self," see
8d71eef1da
Unfortunately this can cause mc+fish to break for users who configured
fish with "set -U fish_features all" which opts into any new feature
flag, thus disabling %self expansion.
Prevent this potential breakage by using the recommended "$fish_pid",
which was introduced in fish 3.0.0 (December 2018).
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
The -w option sets the working directory for the temporary archive 7-zip
builds when modifying an existing one. The option cant be used to set
the base path inside an archive when adding something into it.
When adding something to a 7z archive by its absolute path, 7zip only
uses the last part of the path by default. E.g. `7z a 1.7z
/tmp/a/b/date.txt` would add date.txt to the root dir inside the
archive. If we wanted the file to be under `a/b/` inside the archive as
well, it should be `7z a 1.7z /tmp/a`.
ClosesMidnightCommander/mc#202.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* (file_op_context_new): change default value of file_op_context_t::do_reget.
* (overwrite_query_dialog): show the "Reget" button in query dialog for
move operation.
* (copy_file_file): keep non-default value of file_op_context_t::do_reget
that was set before.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(edit_callback): use bracketed_pasting_in_progress variable to detect
if text is being pasted. If yes, paste text as is without macro
expanaison.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* (tar_read_header): canonicalize path name after decoding of all
headers occupied with long file/directory name.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* (extfs_open_and_read_archive): fix NULL dereference if
extfs_open_archive() doesn't create an error.
* (extfs_open_archive): create an error message when mc_open() returns -1.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
We currently call Bash with argv[0] being just the fixed string
"bash", but this confuses Bash when it initializes the shell variable
BASH, which are expected to be the absolute file path to the current
Bash image. This patch fixes argv[0] to be the actual path that mc
uses to start Bash.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
../../../src/filemanager/filegui.c:1413:35: warning: implicit conversion from 'int' to 'mode_t' (aka 'unsigned short') changes value from 262143 to 65535 [-Wconstant-conversion]
ctx->umask_kill = 0777777;
~ ^~~~~~~
../../../src/filemanager/fileopctx.c:81:23: warning: implicit conversion from 'int' to 'mode_t' (aka 'unsigned short') changes value from 262143 to 65535 [-Wconstant-conversion]
ctx->umask_kill = 0777777;
~ ^~~~~~~
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
../../../../src/vfs/sftpfs/connection.c:787:22: warning: passing 'unsigned char *const' to parameter of type 'const char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
if (strncmp (prompts[i].text, "Password: ", prompts[i].length) == 0)
^~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:84:26: note: passing argument to parameter '__s1' here
int strncmp(const char *__s1, const char *__s2, size_t __n);
^
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
../../../src/filemanager/file.c:2402:61: warning: variable 'attrs' may be uninitialized when used here [-Wconditional-uninitialized]
while (attrs_ok && mc_fsetflags (dst_vpath, attrs) != 0 && !ctx->skip_all)
^~~~~
../../../src/filemanager/file.c:2266:24: note: initialize the variable 'attrs' to silence this warning
unsigned long attrs;
^
= 0
../../../src/filemanager/file.c:3227:38: warning: variable 'attrs' may be uninitialized when used here [-Wconditional-uninitialized]
mc_fsetflags (dst_vpath, attrs);
^~~~~
../../../src/filemanager/file.c:2942:24: note: initialize the variable 'attrs' to silence this warning
unsigned long attrs;
^
= 0
../../../lib/strutil/tokenize.c:163:44: warning: variable 'delimopen' may be uninitialized when used here [-Wconditional-uninitialized]
if (nestdelim != 0 && string[i] == delimopen)
^~~~~~~~~
../../../lib/strutil/tokenize.c:72:19: note: initialize the variable 'delimopen' to silence this warning
char delimopen;
^
= '\0'
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Path to libssh2 headers was missing from CPPFLAGS resulting into FTBFS.
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* (add_to_list_take): new function: listbox_add_item_take() wrapper.
* (insert_file): use add_to_list_take().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Properly parse %h hostname token, which is widely used in HostName directive within
~/.ssh/config:
Host testing*
HostName %h.eu.example.com
Host staging*
HostName %h.us.example.net
# this host will be expanded to `testing-1.eu.example.com`
% mc sftp://username@testing-1
ClosesMidnightCommander/mc#197.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* (vfs_dirent_assign): set d_len up.
* (mc_readdir): sync with new vfs_dirent: use d_len member.
* (filename_completion_function): likewise.
* (handle_dirent): likewise.
* (find_ignore_dir_search): add 2nd argument to use length of
directory name if it's known.
* (do_search): sync with modified vfs_dirent and find_ignore_dir_search().
* (NLENGTH): remove.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>