Originally from: http://mail.gnome.org/archives/mc-devel/2005-April/msg00035.html
The routines `vfs_s_find_entry_linear()' and `vfs_s_find_entry_tree()'
call `canonicalize_pathname()' on entry. This routine eats `..' path
components in certain cases. In case of ftpfs this is not desired -
the path should be kept as is since the code in direntry.c doesn't have
enough knowledge of the directory structure on the remote end.
Assume that
there is a path like this on the remote server
/path1/path2/path3
The `path2' component is a symlink to some directory and `path3' is a
symlink stored in `path2' which is relative to `path2' i.e.
path2
path3 -> ../some/other/path
Now, the code in direntry.c will determine that `path3' is a symlink and
will try to resolve (vfs_s_resolve_symlink) it by passing the following path
/path1/path2/../some/other/path
to `vfs_s_find_entry_linear' . As I've said above this routine calls
`canonicalize_pathname' on entry which will modify the path like this:
/path1/some/other/path
Now this is clearly wrong since `path2' is a symlink and it should be
resolved first. In the case of ftpfs the code in direntry.c doesn't have
enough knowledge about physycal directory layout on the remote filesystem
so it shouldn't try to canonicalize the path. The path should be left as
is and passed to the remote end for processing.
Fix issue:
Changed function canonicalize_pathname (as fact, renamed to custom_canonicalize_pathname)
In this function added ability to partial canonicalize of pathname.
And some functions from vfs/direntry.c calls custom_canonicalize_pathname without
removal of '..' stuff.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Set of patches that correct minor mistakes and mistypes in the man files
from Denis Briand. Thanks!
Fixes suggested by Slava Zanko and Andrew Borodin: always use
@sysconfdir@/mc instead of hardcoded /etc/mc for configuration pathes in
mans.
Ctrl-g instead of Ctrl-c is used now to generate SIGINT signal.
SIGINT signal generating for MC/NCurses library is enabled now.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Added option 'auto_save_setup_panels' into [Midnight-Commander] section of ini-file.
If no specified, value of this option is equal to value of 'auto_save_setup' option.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
The 0xff character is valid character in CP1251 codepage,
therefore the proper unsigned extension of char to int
is required in stuff() function to avoid the 0xff as -1
interpretation in handle_char() function.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Ther eare 7 untranslated items, they need to be looked after some other time.
Some bugs were fixed and many strings were translated. Please update.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
viewer hangup after search in archive
Test case:
* download ftp://ftp.slackware-brasil.com.br/slackware-12.0/testing/MANIFEST.bz2 or any slackware MANIFEST.bz2 from internet
* F3 under MANIFEST.bz2
* F7 "fortunes-o.tar.gz"<enter>
* hangup
Fix issue:
* Change growbuff from owm implementation into g_ptr_array
* Fixed calculating of search_start position
* Search module: fixed checking for return code from update callback
* Search module: Added return code MC_SEARCH_CB_OK for search callbacks
* Added exit on keyboard break
* Fixed search in last grow'ed block
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
TOSTOP doesn't work well with some software. Examples known to me are:
- debugging multithreaded program with gdb (gdb job stops)
- running 'check' tests in fork mode (default) that do some output
(tests mysteriously fail due to timeout)
IMO TOSTOP adds too little value compared to compatibility problems it
creates.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
ENTRY "example.net" URL "/#ftp:examplenet:5wDJP1B/y@example.net"
When I try connect to it I saw:
"ftpfs: making connection to examplenet"
off course this is failed by timeout.
Fix issue:
Now search for '@' sign.
If present - search for slash at found position
If not present - search at start of string.
Also fixed parce '@' sign into password area of URI.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Since Ctrl-C is used as common shortcut, don't use it
to generate the SIGINN signal in S-Lang library.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 1845_code_cleanup: (30 commits)
editcmd.c 'eval_marks': removed unused variable 'diff'
The check result of g_new(), g_new0(), g_malloc(), g_malloc0() and g_realloc() is useless.
Remove declaration of unused function.
Added glib library for mcserv
rearranging some lines in src_skin_colors.c mc_skin_color_parse_ini_file()
missing check in src_mcconfig_get.c-mc_config_get_groups()_-2
Unifying of g_strconcat() calls
Types accuracy, minor optimization, removed unneeded goto and return.
Fixed i18n of file operation dialog titles.
added NULL check before call g_utf8_find_prev_char, g_utf8_get_char_validated for more safety.
More usage of GLib functions.
No need to call done_menu() at MC exit.
Optimization of DLG_RESIZE message handling.
doxygen: various warning fixes
Fixed forgotten call of va_end() in mc_log().
src/boxes.c (configure_vfs): fixed #ifdef directive.
m4.include/mc-cflags.m4: added -fdiagnostics-show-option (exact warning option)
configure.ac: guard $CFLAGS with "" in tests
m4.include/mc-cflags.m4: sorted CFLAGS (no flags were added or removed)
cflags: enable -Wformat in maintainer mode
...
g_new(), g_new0(), g_malloc(), g_malloc0() and g_realloc() functions
never return NULL and call abort() on fail. So check result of these
functions is useless. g_try_new(), g_try_new0(), g_try_malloc(),
g_try_malloc0() and g_try_realloc() functions are used instead.
Some minor optimization and code formatting are also performed.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>