Commit Graph

14265 Commits

Author SHA1 Message Date
xenogenesi
8e8229931e sftpfs: refactoring: move obtaining of stat info from sftp attributes to separate function.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-28 10:18:08 +03:00
Andrew Borodin
b5cf04bc8d sftpfs: refactoring: move error check to separate function.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-28 10:18:08 +03:00
xenogenesi
a241f472bf Fix sftp error 31 (proto 4 and 2)
See https://midnight-commander.org/ticket/3406#comment:13
and https://midnight-commander.org/ticket/3406#comment:16.

Both _lstat and _stat need to handle NO_SUCH_FILE while
copying to a remote sftp.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-28 10:18:08 +03:00
Andreas Mohr
1866f9169f sftp handle LIBSSH2_FX_PERMISSION_DENIED as EACCES.
When libssh2_sftp_stat_ex(LIBSSH2_SFTP_STAT|LIBSSH2_SFTP_LSTAT) returns with
LIBSSH2_ERROR_SFTP_PROTOCOL (-31) and LIBSSH2_FX_PERMISSION_DENIED (3)
handle this error case like local stat/lstat() returns -EACCES.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-28 10:18:08 +03:00
Andreas Mohr
22076e2d8b Ticket #3406: sftpfs: fix -31 SFTP Protocol Error when transferring file via SFTP Link.
Initial commit: extend error message with sftp session error.

When LIBSSH2_ERROR_SFTP_PROTOCOL (-31) occurs extend error message
with sftp last error for better failure tracking.

With #3269 patch further sftp protocol error message now looks like
SFTP Protocol Error 3 (-31).

Currently I have no nice solution for print relevant called libssh2 function too
I don't want pollute _to_gliberror() with contant strings all over.

sftp session error 3 means (file) permission denied.

From libssh2-1.5.0/include/libssh2_sftp.h

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-28 10:18:08 +03:00
Andrew Borodin
218dcea543 Merge branch '3865_exfs_rpm_scripts'
* 3865_exfs_rpm_scripts:
  extfs: rpm: unset hardcoded irrelevant size of RPM scripts.
  Ticket #3865: extfs: rpm: INSTALL is truncated in the viewer
2017-12-24 09:44:36 +03:00
Andrew Borodin
8d0c1c305a extfs: rpm: unset hardcoded irrelevant size of RPM scripts.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-24 09:44:24 +03:00
Anatoly Borodin
cf94e56acf Ticket #3865: extfs: rpm: INSTALL is truncated in the viewer
Before the rewrite e7ed071be7, the files
`INSTALL`, `UPGRADE`, and `REBUILD` were just text files with fixed
length of 39 characters. After the rewrite, the corresponding `rpm`
commands (of variable length) have been added.

If one of these files is being opened with the internal viewer, only the
first 39 characters (hardcoded in `mcrpmfs_list()`) are shown, e.g.
`INSTALL` (before the previous commit):

	# Run this script to install this RPM p

The word 'script' was added inconsistently (compare with `UPGRADE` and
`REBUILD`) and can be removed. The `rpm` commands can be also removed:
they may fail to work if there is a whitespace in the path, so they
cannot always be simply copy&pasted; it's is still possible to "run" the
script files with Enter.

Signed-off-by: Anatoly Borodin <anatoly.borodin@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-24 09:44:24 +03:00
Yury V. Zaytsev
38ce185cd3 Merge branch '3890_syntax_mjs' 2017-12-24 06:58:37 +01:00
Yury V. Zaytsev
a778825d0e Ticket #3890: syntax - add mjs extension to JavaScript pattern
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2017-12-23 20:09:17 +01:00
Andrew Borodin
4fcc19b581 Syntax.in: fix pattern for Ruby program. 2017-12-18 11:01:35 +03:00
Andrew Borodin
312b316577 Merge branch '3148_achown_mouse'
* 3148_achown_mouse:
  achown: add mouse support for permission buttons.
  achown: use Space key to invert current permission flag.
  (advanced_chown_callback): button is already focused, don't focus it again.
  achown: handle some keys in permission button callback.
  achown: add callback for permission buttons
  achown: clarify text positions.
  achown: clarify location of user and group listbox window.
  Ticket #3148: add mouse support in 'Advanced chown' window.
2017-12-16 14:08:43 +03:00
Andrew Borodin
5eb4010b0d achown: add mouse support for permission buttons.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-10 09:19:15 +03:00
Andrew Borodin
aa36eb38ce achown: use Space key to invert current permission flag.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-10 09:19:15 +03:00
Andrew Borodin
fe63828b8b (advanced_chown_callback): button is already focused, don't focus it again.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-10 09:19:15 +03:00
Andrew Borodin
4943e52320 achown: handle some keys in permission button callback.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-10 09:19:15 +03:00
Andrew Borodin
48d85a42b4 achown: add callback for permission buttons
...to change behaviour of WButton objects.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-10 09:19:15 +03:00
Andrew Borodin
4b0edd90cf achown: clarify text positions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-10 09:19:15 +03:00
Andrew Borodin
e9639ef526 achown: clarify location of user and group listbox window.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-10 09:19:15 +03:00
Andrew Borodin
4232ae211a Ticket #3148: add mouse support in 'Advanced chown' window.
Initial step: apply callback to User and Group buttons
to show user and group list respectively using mouse.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-10 09:19:15 +03:00
Andrew Borodin
434239f29a Merge branch '3850_chmod_chown_abort'
* 3850_chmod_chown_abort:
  Implement cancel of advanced chown of many files.
  Implement cancel of chown of many files.
  chmod: some optimization.
  Implement cancel of chmod of many files.
  Ticket #3850: implement cancel of chmod/chown/achown of many files.
2017-12-10 09:12:15 +03:00
Andrew Borodin
24d9a4d4b1 Implement cancel of advanced chown of many files.
Implement error message with follow buttons:
"Ignore" -- ignore current error;
"Ignore all" -- ignore current error, try chmod/chown of other selected
files, and ignore all following errors;
"Retry" -- retry chmod/chown operation;
"Cancel" -- cancel chmod/chown operation immediately.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-10 09:10:23 +03:00
Andrew Borodin
331a0b2cc9 Implement cancel of chown of many files.
Implement error message with follow buttons:
"Ignore" -- ignore current error;
"Ignore all" -- ignore current error, try chown of other selected files,
and ignore all following errors;
"Retry" -- retry chown operation;
"Cancel" -- cancel chown operation immediately.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-10 09:10:23 +03:00
Andrew Borodin
6aafb1189b chmod: some optimization.
Get rid of extra conversion vfs_path_t -> char * -> vfs_path_t.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-10 09:10:22 +03:00
Andrew Borodin
34cbab7c2a Implement cancel of chmod of many files.
What steps will reproduce the problem?
1. Selected many files (12000 in my case).
2. Ctrl+x c (chmod) - changed mode to desired one.
3. MC started to change file modes but failed, it shows error popup
"Cannot chmod ... Operation not permitted (1)" for every file and waits
for a keypress.
MC shows error for every file in a list (12000 times), there is no
chance to cancel the whole operation, only to press any key 12000 times
or to kill MC.

The solution: implement error message with follow buttons:
"Ignore" -- ignore current error;
"Ignore all" -- ignore current error, try chmod of other selected files,
and ignore all following errors;
"Retry" -- retry chmod operation;
"Cancel" -- cancel chmod operation immediately.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-10 09:10:22 +03:00
Andrew Borodin
fd44219178 Ticket #3850: implement cancel of chmod/chown/achown of many files.
Initial step: sync of chmod, chown, achown source code:
some refactoring, renaming, reordering, type accuracy, #include clean up.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-10 09:10:22 +03:00
Igor Shaula
3a5da75181 Ticket #3884: mceditor: syntax: add rust.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-07 13:58:07 +03:00
Yury V. Zaytsev
d5bd2d87d7 main: bump gnu global version to 6.5.7 (used to build source index) 2017-12-03 09:30:12 +01:00
Yury V. Zaytsev
38de86b7ce maint: shorten travis build logs by discarding global build output
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2017-12-02 23:18:39 +01:00
Andrew Borodin
37dcdf65b3 Merge branch '3883_size_trunc_sep'
* 3883_size_trunc_sep:
  Ticket #3883: size_trunc_sep() breaks on multibyte locales.
2017-12-02 20:07:08 +03:00
Andrew Borodin
069306eb2e Ticket #3883: size_trunc_sep() breaks on multibyte locales.
The bug was introduced in b3867a6e15.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-02 14:41:35 +03:00
Andrew Borodin
917cd17281 Merge branch '3880_fail_ncurses_link'
* 3880_fail_ncurses_link:
  Ticket #3880: fail to link to ncurses built as two libraries: ncurses+tinfo.
2017-12-02 14:17:09 +03:00
Jeroen Roovers
bf771dc8a7 Ticket #3880: fail to link to ncurses built as two libraries: ncurses+tinfo.
https://bugs.gentoo.org/527118

When ncurses library is built with --with-termlib option
the resulting installation contains two libraries:

/lib64/libncurses.so.6
/lib64/libncursesw.so.6
/lib64/libtinfo.so.6
/lib64/libtinfow.so.6

As a result mc build fails as:

$ ./configure --with-screen=ncurses
$ make

  CCLD     mc
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld:
./.libs/libinternal.a(tty-ncurses.o): undefined reference to symbol 'meta'
/lib64/libtinfow.so.6: error adding symbols: DSO missing from command line

Patch: https://gitweb.gentoo.org/repo/gentoo.git/tree/app-misc/mc/files/mc-4.8.13-tinfo.patch

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-02 11:48:16 +03:00
David Martin
26a2617256 Ticket #3879: i18n of argument type names in --help blocks.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-02 11:24:46 +03:00
Yury V. Zaytsev
843b2b68ad Update translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2017-11-25 19:20:33 +01:00
Yury V. Zaytsev
92f190ee81 Update doc/NEWS file
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2017-11-18 19:40:31 +01:00
Yury V. Zaytsev
0f093e591f Update hints translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2017-11-18 19:37:06 +01:00
Yury V. Zaytsev
9d8c780934 maint: fix hint file processing
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2017-11-18 19:36:20 +01:00
Yury V. Zaytsev
98c4bc3a08 Update po/mc.pot
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2017-11-18 19:09:00 +01:00
Yury V. Zaytsev
3bca8774ff Update translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2017-11-18 19:07:57 +01:00
Andrew Borodin
2f25f66b5d Merge branch '3780_cleanup'
* 3780_cleanup: (26 commits)
  src/vfs/extfs/helpers/README: fix path to user scripts.
  (button_callback): clean up unneeded type casting.
  Fix 2nd argument of gauge_show() call.
  Sync with gnulib 3b1faeb2e29b62588709208f97d34c1787777dcb.
  (do_link): minor optimization.
  (do_link): fix coding style.
  Syntax.in: simplify pattern for HiveQL.
  (vfs_path_from_str_deprecated_parser, vfs_path_from_str_uri_parser): remove unused flags argument.
  (vfs_path_from_str_uri_parser): fix detection of relative path.
  (diff_two_paths): optimizate path comparision.
  (diff_two_paths): minor optimization: exit loop ASAP.
  (diff_two_paths): reduce variable scopes.
  (message): Use "%s" to fix incorrect translation with printf pattern(s)
  (parm_table[]): Make const to relocate 13624 bytes from .data to .text. (init_globals): fstring is enough for "%d.%d". (*): Remove nmbd code.
  (_interpret_node_status): Remove dead code.
  (buttonbar_call): fix possible NULL dereference.
  (mcview_mouse_callback): fix typo.
  (jobs_fill_listbox): cleanup pointer-compare warning.
  (set_panel_filter_to): rename variable and use MC_PTR_FREE macro.
  (set_panel_filter): fix coding style.
  ...
2017-11-17 16:03:39 +03:00
Andrew Borodin
d1e4655d05 src/vfs/extfs/helpers/README: fix path to user scripts. 2017-11-17 16:01:30 +03:00
Andrew Borodin
6310e07745 (button_callback): clean up unneeded type casting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:30 +03:00
Andrew Borodin
1d2cbee320 Fix 2nd argument of gauge_show() call.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:30 +03:00
Andrew Borodin
d5f4e631c3 Sync with gnulib 3b1faeb2e29b62588709208f97d34c1787777dcb.
* m4.include/ls-mntd-fs.m4: make sure $host and $host_os are defined
when used.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:30 +03:00
Andrew Borodin
3a3a6479d3 (do_link): minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:30 +03:00
Andrew Borodin
55bafd40e5 (do_link): fix coding style.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:30 +03:00
Andrew Borodin
e1ee3a2465 Syntax.in: simplify pattern for HiveQL.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:30 +03:00
Andrew Borodin
3424622d5a (vfs_path_from_str_deprecated_parser, vfs_path_from_str_uri_parser): remove unused flags argument.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:29 +03:00
Andrew Borodin
8715c41a47 (vfs_path_from_str_uri_parser): fix detection of relative path.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:29 +03:00