Commit Graph

13296 Commits

Author SHA1 Message Date
Andreas Mohr
2d7430b520 Cleanup unused option_edit_*_extreme variables.
one-way variables as source for macro definitions

Signed-off-by: Andreas Mohr <and@gmx.li>
2016-03-04 09:23:36 +03:00
Andreas Mohr
c2060a420a Clarify macro variables for USE_INTERNAL_EDIT.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:36 +03:00
Andreas Mohr
785a2fc6e9 (ftpfs_load_no_proxy_list): cleanup unneeded mc_file static cast.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:36 +03:00
Andreas Mohr
d72390a45d Cleanup internal filemanager layout variables.
_free_space and _xterm_title never used.
_command_prompt, _keybar_visible, _menubar_visible, _message_visible used within layout_callback() only.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:36 +03:00
Andreas Mohr
686ce302bd Clarify mc_args__debug_level declare.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:36 +03:00
Andrew Borodin
1528f8e4c4 src/filemanager/usermenu.c: use gboolean type for boolean variables.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:36 +03:00
Andrew Borodin
1c26cf804a src/filemanager/usermenu.c: apply coding guidelines.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:36 +03:00
Andrew Borodin
0e1dfbf2b9 (regex_command_for): minor optimisation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:36 +03:00
Yury V. Zaytsev
391821e4ab Ticket #3379: fix bashism in gitfs+ extfs helper
Original reporter: Raphael Geissert <atomo64@gmail.com>, upstreamed by
Dmitry Smirnov <onlyjob@member.fsf.org>.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-03-04 09:23:36 +03:00
Andrew Borodin
88b489ee33 filehighlight.ini: externsions are alphabetically sorted.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:36 +03:00
Andrew Borodin
b3f4fc2212 Ticket 3547: code cleanup bebore 4.8.16 release.
filehighlight.ini: add lzma extension.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:36 +03:00
Yury V. Zaytsev
10a1c9d846 Merge branch '3577_file_copy_preallocation' 2016-03-02 21:18:13 +01:00
Andrey Gursky
47830e09b4 src/filemanager/file.c: (copy_file_file) fix typo in the error message
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-02-29 22:17:35 +01:00
Andrey Gursky
5f63997891 Type accuracy in file operation routines (leftovers)
These are leftovers of 159f5fdff1.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-02-29 22:16:29 +01:00
Andrey Gursky
9ee5766748 Ticket #3577: Fix preallocation if appending during file copy
The value of `ctx->do_append` is reset:

    appending = ctx->do_append;
    ctx->do_append = FALSE;

Use `appending` in following conditionals instead.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-02-29 22:12:28 +01:00
Yury V. Zaytsev
f69b08bbd0 Merge branch '3599_fish_minor_major' 2016-02-29 21:48:24 +01:00
Andreas Mohr
ee6dd89deb Ticket #3599: provide major/minor info for block/char devices (FISH)
Perl ls helper did not provide major/minor info for block/char devices,
and `ls -lan` wasn't working because of a typo.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-02-28 22:03:37 +01:00
Andrew Borodin
d5668b60b6 Merge branch '3594_find_file_content'
* 3594_find_file_content:
  Find File: reorder content related checkboxes.
  Find File: describe "Content" input field.
  Remove "Search for content" checkbox.
  Ticket #3594: Find file: change behavior of content search.
2016-02-27 09:12:17 +03:00
Andrew Borodin
2f53c46279 Find File: reorder content related checkboxes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-27 09:11:40 +03:00
Andrew Borodin
fee4349ed8 Find File: describe "Content" input field.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-27 09:11:40 +03:00
Andrew Borodin
9fba781d45 Remove "Search for content" checkbox.
If "Content" input field is empty, don't search for content.
Also disable all content related checkboxes in this case.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-27 09:11:40 +03:00
Andrew Borodin
2b6c45a211 Ticket #3594: Find file: change behavior of content search.
Initial commit: refactoring.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-27 09:11:40 +03:00
Mooffie
ebf57a81fb Expand comment about hypothetical MSG_ACTIVATE.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-23 20:49:13 +03:00
Yury V. Zaytsev
2ed989827f maint: minor improvements to source index by mooffie
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-02-21 20:21:57 +01:00
Andrew Borodin
89bd95c300 Merge branch '3593_find_file_empty_name'
* 3593_find_file_empty_name:
  Disable some filename related checkboxes if filename is empty.
  Find file: describe "File name" input field.
  Ticket #3593: Find file: empty file name matches any file name.
2016-02-21 10:49:23 +03:00
Andrew Borodin
3e8d61bbd5 Disable some filename related checkboxes if filename is empty.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-21 10:47:59 +03:00
Andrew Borodin
0e9a3fa57a Find file: describe "File name" input field.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-21 10:39:22 +03:00
Andrew Borodin
ebd6c95e83 Ticket #3593: Find file: empty file name matches any file name.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-21 10:39:22 +03:00
Yury V. Zaytsev
47a86b3362 maint: add indexed source generation to Travis deployment script
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-02-19 21:10:32 +01:00
Yury V. Zaytsev
dbb5269100 maint: add Travis CI deployment script
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-02-19 21:10:32 +01:00
Yury V. Zaytsev
ae197c7584 maint: add encrypted deploy key for Travis CI
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-02-18 21:32:07 +01:00
Andrew Borodin
8190c906ee Merge branch '3574_open_silent'
* 3574_open_silent:
  Ticket #3574: fix XDG silent open in background.
2016-02-14 08:47:05 +03:00
Xander Ziiryanoff
9296f0bd6d Ticket #3574: fix XDG silent open in background.
This bug was introduced in 0516ccd325.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-14 08:45:58 +03:00
Andrew Borodin
ab0c2afba5 Merge branch '3581_sftp_fixes'
* 3581_sftp_fixes:
  sftpfs: fix bad pointer arithmetic in config parser.
  (sftpfs_fill_config_entity_from_config): fix read of config file.
  Use LIBSSH2_INVALID_SOCKET macro.
  libssh2_session_startup() is deprecated in libssh2 >= 1.2.8.
  SFTP: refactoring.
  SFTP: minor refactoring.
  (sftpfs_close_connection): fix connection memleaks.
  (sftpfs_close_connection): fix connection memleaks.
  Ticket #3581: various SFTP fixes.
2016-02-13 16:40:13 +03:00
Andreas Mohr
924a84a3b4 sftpfs: fix bad pointer arithmetic in config parser.
When reading ssh_config with matching host entry mc do bad pointer arithmetic.
Fix it! (Also move offsetof values into struct to reduce human mistakes.)

==18689==ERROR: AddressSanitizer: heap-use-after-free on address 0x604000004910 at pc 0x000000641a8b bp 0x7ffca4ab65e0 sp 0x7ffca4ab65d8
WRITE of size 8 at 0x604000004910 thread T0
    #0 0x641a8a in sftpfs_fill_config_entity_from_string /tmp/portage/app-misc/mc-9999/work/mc-9999/src/vfs/sftpfs/config_parser.c:169:30
    #1 0x6413cf in sftpfs_fill_config_entity_from_config /tmp/portage/app-misc/mc-9999/work/mc-9999/src/vfs/sftpfs/config_parser.c:271:13
    #2 0x640b73 in sftpfs_get_config_entity /tmp/portage/app-misc/mc-9999/work/mc-9999/src/vfs/sftpfs/config_parser.c:310:14
    #3 0x64067d in sftpfs_fill_connection_data_from_config /tmp/portage/app-misc/mc-9999/work/mc-9999/src/vfs/sftpfs/config_parser.c:354:21
    #4 0x61ef95 in sftpfs_cb_open_connection /tmp/portage/app-misc/mc-9999/work/mc-9999/src/vfs/sftpfs/vfs_subclass.c:111:5
    #5 0x7f1340c31beb in vfs_s_get_path /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/vfs/direntry.c:1139:18
    #6 0x7f1340c3685c in vfs_s_inode_from_path /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/vfs/direntry.c:380:9
    #7 0x7f1340c34807 in vfs_s_opendir /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/vfs/direntry.c:409:11
    #8 0x7f1340c34ce8 in vfs_s_chdir /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/vfs/direntry.c:476:12
    #9 0x7f1340c3a29f in mc_chdir /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/vfs/interface.c:687:14
    #10 0x530f64 in _do_panel_cd /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/panel.c:3250:9
    #11 0x530e4e in do_panel_cd /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/panel.c:4627:9
    #12 0x532d34 in do_cd /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/panel.c:5027:11
    #13 0x50b64b in do_cd_command /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/command.c:445:14
    #14 0x50c516 in enter /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/command.c:265:9
    #15 0x52704c in midnight_callback /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/midnight.c:1473:17
    #16 0x7f1340c4c761 in dlg_key_event /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:505:15
    #17 0x7f1340c4cc32 in frontend_dlg_run /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:570:9
    #18 0x7f1340c4c935 in dlg_run /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:1267:5
    #19 0x52654d in do_nc /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/midnight.c:1757:9
    #20 0x4f7d8a in main /tmp/portage/app-misc/mc-9999/work/mc-9999/src/main.c:401:21
    #21 0x7f133f1b8953 in __libc_start_main (/lib64/libc.so.6+0x20953)
    #22 0x427368 in _start (/tmp/portage/app-misc/mc-9999/work/mc-9999/src/.libs/mc+0x427368)

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-13 16:38:40 +03:00
Andrew Borodin
0fb104d2b3 (sftpfs_fill_config_entity_from_config): fix read of config file.
Also fix memory leak.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-13 16:37:49 +03:00
Andrew Borodin
8b5f62d244 Use LIBSSH2_INVALID_SOCKET macro.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-13 16:37:49 +03:00
Andrew Borodin
b3f5a0ae5e libssh2_session_startup() is deprecated in libssh2 >= 1.2.8.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-13 16:35:13 +03:00
Andreas Mohr
e740c7d3e5 SFTP: refactoring.
Re-order open_connection and reverse re-order close_connection steps.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-13 16:35:13 +03:00
Andreas Mohr
ece1d020fa SFTP: minor refactoring.
sftpfs_super_data created at sftpfs_cb_open_connection() was freed at sftpfs_close_connection().
It should be sftpfs_cb_close_connection() for logical right location.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-13 16:35:13 +03:00
Andreas Mohr
298273b8f5 (sftpfs_close_connection): fix connection memleaks.
mc missing to free up sftp session data.
This disclose that mc misleadingly freed an internal libssh2.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-13 16:35:13 +03:00
Andreas Mohr
49b59018c9 (sftpfs_close_connection): fix connection memleaks.
When sftpfs_open_connection failed free elements at sftpfs_close_connection().
This was not happen when mcerror was set.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-13 16:35:13 +03:00
Andrew Borodin
0376fb50e0 Ticket #3581: various SFTP fixes.
(sftpfs_cb_open_connection): initialise sftpfs_super_data_t::socket_handle correctrly.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-13 16:35:13 +03:00
Denys Vlasenko
9dcf03342a doc: man pages fixes
sentitive -> sensitive
cusor     -> cursor
toglle    -> toggle
"the the" -> the

Fixed bad English in a number of places.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-02-11 21:41:17 +01:00
Andrew Borodin
c49d7f76b0 tests/lib/serialize.c: fix error codes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-02 10:08:08 +03:00
Andrew Borodin
2fa5952097 Merge branch '3269_error_message'
* 3269_error_message:
  Update po/*.po files.
  Clarify some error messages using error code.
  Use meaningful errno or 0.
  Ticket #3269: only print meaningful error code.
2016-02-02 09:47:23 +03:00
Andrew Borodin
ba27f137e6 Update po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-02 09:46:20 +03:00
Andrew Borodin
6fac768fbf Clarify some error messages using error code.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-02 09:42:51 +03:00
Andreas Mohr
b9797d6637 Use meaningful errno or 0.
Use real errno or set it to 0 when no meaningful error code exists
for current user error message.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-02 09:42:51 +03:00
Andreas Mohr
842a723f9b Ticket #3269: only print meaningful error code.
Some error messages have no meaningful error code, don't display them.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-02 09:42:51 +03:00