Commit Graph

11570 Commits

Author SHA1 Message Date
Andrew Borodin
4d399b8f7e (vfs_path_element_clone): ret rid of extra actions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 12:31:23 +03:00
Andrew Borodin
f35a11e95c (vfs_get_raw_current_dir): return pointer to constant.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 12:31:23 +03:00
Andrew Borodin
ad6e60d86f g_dirname and g_basename function are deprecated since glib-2.2.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 12:31:23 +03:00
Andrew Borodin
cc46ca7627 Ticket #2781: cleanup before 4.8.3 release.
Fixed --no-x11 option name in man pages.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 12:31:20 +03:00
Slava Zanko
b1dc778b3d Ticket #2779: Active VFS directories list contain incorrect current path
1) login to any ftp or fish resource
2) select ftp/fish entry and change current path
3) go back to old path
4) press Ctrl+X A (open "Active VFS directories" dialog)

Expected result: should be correct path to current VFS path
Actual result: path is incorrect.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:56 +03:00
Slava Zanko
73bd401db1 Ticket #2777: Stale symlinks in vfs
How to reproduce:
 * mkdir -p a/b/c
 * touch a/b/c/d
 * ln -s d a/b/c/e
 * tar -cf bad.tar a
 * rm -rf a
 * cd bad.tar/utar://a/b/c

Expected result: 'e' should be valid symlink to 'd'
Actual result: 'e' looks like broken link

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:56 +03:00
Slava Zanko
4d34ce0eb8 Ticket #2765: Show directory sizes on any VFS is broken
Command "Show directory sizes" shows zero when executed on ftp, utar, fish etc.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:56 +03:00
Slava Zanko
31e94609f4 Ticket #2775: segfault after open incorrect archive
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:56 +03:00
Slava Zanko
1d9974ae0d Ticket #2760: The password for session ftp remains in input history
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:56 +03:00
Andrew Borodin
ed134d9198 (diff_view): make static.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 10:31:56 +03:00
Andrew Borodin
abc364791e Make mcdiff verbose if one or both parameters are incorrect.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 10:31:56 +03:00
Sergei Trofimovich
c8e584dead Ticket #2768 ('make check' failed)
tests/.../do_panel_cd.c: fix test when 'HOME' contains trailing slashes.

Steps to reproduce:

    $ HOME=${HOME}/ make check
    Running suite(s): /src/filemanager
    cwd=/subvolumes/var_tmp/paludis/app-misc-mc-9999/temp
    mc_config_get_home_dir ()=/subvolumes/var_tmp/paludis/app-misc-mc-9999/temp/
    0%: Checks: 1, Failures: 1, Errors: 0
    do_panel_cd.c:86:F:Core:test_do_panel_cd_empty_mean_home:0: Assertion 'ret' failed

The patch adds home dir path normalization.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2012-04-22 10:31:55 +03:00
Sergei Trofimovich
f5550766fe tests/.../do_panel_cd.c: show patch mismath on test failure
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2012-04-22 10:31:55 +03:00
Andrew Borodin
12018c5e5a Optimization of second panel directory setup.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:55 +03:00
Andrew Borodin
ec1e364927 Ticket #2762: mc ignores second directory argument.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 10:31:55 +03:00
Slava Zanko
0440b5c95e Ticket #2759: Unable to edit gzipped files
Steps to reprosuce:

 *) dmesg| gzip -c9 > out.gz
 *) press F4 on out.gz file

Expected result: editor should be opened
Actual result: segmentation fault.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:55 +03:00
Slava Zanko
28408d2bb9 Fixed creating string from relative non-local VFS.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:55 +03:00
Slava Zanko
f4fdd5c3df Ticket #2758: cd command not working in shell link
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:55 +03:00
Slava Zanko
a6e3bed929 hotlist: fixed broken newly added entries.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:55 +03:00
Slava Zanko
f1b09134b1 Ticket #2753: fixed entering to old-style path format.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:55 +03:00
Andrew Borodin
bd31aa273d (extfs_get_path_mangle): minor optimization.
Avoid string allocation if it is really unneeded.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 10:31:55 +03:00
Andrew Borodin
ff26359af3 (panel_reload): fixup of panel current directory obtain.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 10:31:54 +03:00
Andrew Borodin
e0db03b20d (edit_load_file_from_filename): fixed file unlocking.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 10:31:54 +03:00
Ilia Maslakov
97025ab61a fixed reading the not initialized data
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-04-22 10:31:54 +03:00
Slava Zanko
316cac613c Ticket #2695: fixed segfault on newly created files in editor
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:54 +03:00
Slava Zanko
5eb1ada34e Ticket #2695: Fixed segfault while new file created in editor.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:54 +03:00
Slava Zanko
aae68db301 Fixed creation of lock files
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:54 +03:00
Slava Zanko
be271db9f3 Changed function remove_encoding_from_path() for return vfs_path_t type
Also, fixed bug with non-changeable encoding inside archives.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:54 +03:00
Slava Zanko
80d4a13daf fixup! Added tests for examine_cd() function. 2012-04-22 10:31:54 +03:00
Slava Zanko
e4054ad285 panels: Show archive name when entering to archive
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:54 +03:00
Slava Zanko
03643360ad Fixed destination file name when file dialog with single operation is appear
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:54 +03:00
Slava Zanko
29f4c2bdf6 vfs_path: Fixed broken relative paths processing.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Andrew Borodin
de3d2b9061 Reimplemented list of operated files using GSList.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 10:31:53 +03:00
Slava Zanko
27b6ef7e43 Return values of following functions are constants now:
* vfs_path_get_last_path_str()
  * vfs_path_get_last_path_vfs()
  * vfs_path_get_by_index()
  * vfs_class_find_by_handle()

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 10:31:53 +03:00
Slava Zanko
87c0c302a2 Changed src/filemanager/file.c to handle vfs_path_t objects.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Slava Zanko
0e96c18858 Changed lot of functions in src/ directory
...to handle vfs_path_t objects.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Slava Zanko
bd21f6d989 Share same code between update_xterm_title_path() and midnight_get_title() functions
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Slava Zanko
9dad3cf45c Changes to handle vfs_path_t object:
* removed strip_password () function;
 * Added new vfs_path flag: VPF_HIDE_CHARSET;
 * added vfs_path_add_element() function.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Slava Zanko
7f974fdbbb VFS: Added new function vfs_path_to_str_flags()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Slava Zanko
ff85ae5400 Use vfs_path_t in execute.c and subshell.c.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Slava Zanko
d590e13fb1 Changed do_cd() and do_panel() functions
...to handle vfs_path_t objects.

Changed panelized_panel_t.root type to vfs_path_t.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Slava Zanko
9a7750ca2f Added unit test for do_panel_cd() functions.
Check if empty directory is mean 'change current directory to home dir'.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
493a8ce96d Code refactoring: removed concat_dir_and_file() function.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
a83624cc75 Code refactoring
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
d6eb009bd8 Changed internal viewer to use vfs_path_t objects.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
95fdd25753 Changed internal editor to use vfs_path_t objects.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
d8f91d556a Changed lock_file() and unlock_file() functions
...to handle vfs_path_t objects.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
5480fe5f80 Changed treestore functions to handle vfs_path_t objects.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
fec5cd6c5d Added function vfs_path_cmp()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
d71e62c9fc Added vfs_path_cmp() ans vfs_path_ncmp() functions
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00