Commit Graph

11001 Commits

Author SHA1 Message Date
Slava Zanko 2ec4cc59ab Added URL-like path parser
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:01 +03:00
Slava Zanko 39462b9b76 Reorder VFS parser to work with VFS parameters:
* Removed vfs_path_element_t->raw_url_str;
 * Changed some VFS prefixes (colon now used when need to split VFS prefix and VFS parameters);
 * Removed vfs_translate_url() functions and related code;
 * added converter of VFS parameters to string representation.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:01 +03:00
Slava Zanko bd022573e5 Handle path /some/path/#vfsprefix:/path as /some/path#vfsprefix:/path
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko 5b862005bd Remove usage of vfs_path_t->raw_url_str from src/* files
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko e6ec447585 Following prototypes of functions was changed in VFS-module API:
* archive_check
 * archive_same
 * open_archive

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko e9ed6a41cf Added function vfs_path_url_split() for parse VFS parameters
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko 3d1e2df9b7 Removed vfs_get_class() function
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko 922114a1d0 Following prototypes of functions was changed in VFS-module API:
* archive_check
 * archive_same
 * open_archive

Added new functions:

 * vfs_path_element_clone()
 * vfs_path_clone()
 * vfs_path_remove_element_by_index()

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko c442e5e75f Changed custom_canonicalize_pathname() function for handle URL:// style
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko d931785fd3 Added test for canonicalize_pathname() function
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko 997876a109 Remove vfs_url_t structure (replace with vfs_path_element_t)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko 3eafe7308a Added serialization and deserialization for vfs_path_t object
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko e7bb47cc2d Added ability to serialize/deserialize strings and config objects(mc_config_t)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko be0f9dda56 mcconfig: make parameters in some functions as const mc_config_t *
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko f8c45706e1 Avoid memory leaks in vfs tests
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko e8d58f188d Fixed segfault while trying create dir in r/o VFS'es
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko cec54195e7 Changes in VFS-tests.
* added test for checking encoding in VFS-module
 * fixed names of log-files for tests

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko ac939a1bea Fixed path recoding in VFS modules
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko 691c06ce30 removed vfs_path_t->unparsed variable
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko a5dc2de78b Added vfs_change_encoding() and vfs_path_element_need_cleanup_converter() functions.
Changes for handling directory encoding.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko c0004807d4 vfs_path_element_t->encoding now handled in lib/vfs/path.c
Added testcase for testinh path encoding.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko cedad03833 Move vfs_get_encoding() to path.c and make as static function.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko b0df841a4a Removed vfs_path_t->unparsed_encoding.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko ebe519ef15 remove struct dirinfo definition
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko 405cc98cea VFS: Make functions vfs_canon_and_translate() and vfs_canon() as static in lib/vfs/path.c
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko 8ea49095c3 Changed functions vfs_file_is_local() and vfs_file_class_flags() for handle vfs_path_t type
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko c6796f790d VFS-plugins: remove usage of vpath->unparsed from 'local' plugin
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko 7745006b60 VFS: removed interface.h
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko 093128c532 VFS: Current directory handler now have type vfs_path_t
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko c188153507 Add more tests for VFS
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko a12fdfbb0e VFS: many changes for use vfs_path_t
* completed vfs_path_from_str();
 * completed vfs_path_to_str() and vfs_path_to_str_elements_count();
 * removed deprecated vfs_split();
 * changes in all related code;
 * new unit tests.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko 9e4dc03e9e lib/vfs/direntry.c: vfs_s_inode_from_path() and vfs_s_get_path() now handle vfs_path_t
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko 9a28ce8c8d Add more tests for VFS
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko 6329976c89 VFS: fixed # sign in passwd or in path string
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko 91f3d8f4fd Added strrstr_skip_count() function.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko fc8a86766b Add more tests for VFS
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko 457c8b89e7 Changed internal function sfs_redirect() for handle vfs_path_t arg
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko 137ad4483d Changed internal function ftpfs_send_command() for handle vfs_path_t arg
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko 152124d9b7 Following prototypes of functions was changed in VFS-module API:
* getid
 * mkdir
 * rmdir
 * setctl

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko d67da5dfa8 Following prototypes of functions was changed in VFS-module API:
* readlink
 * symlink
 * rename
 * link
 * unlink
 * mknod

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko 1406eb5035 Following prototypes of functions was changed in VFS-module API:
* opendir
 * stat
 * lstat
 * chdir

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko bf54195f07 added tests for get_vfs_class() function
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko dd19ca201d Following prototypes of functions was changed in VFS-module API:
* chmod
 * chown
 * utime

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko 479902f83e Following prototypes of functions was changed in VFS-module API:
* open
 * getlocalcopy
 * ungetlocalcopy

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko 41f2e27f8d VFS: Use vfs_path_t in some interface functions
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko 3a1936aade Added vfs_path_t structure
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:57 +03:00
Slava Zanko 2c0ae5aa55 Moved interface functions from lib/vfs/vfs.[ch] to lib/vfs/interface.[ch]
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:57 +03:00
Andrew Borodin 42bc3171c3 Ticket #2361: VFS URI reimplementation
Created vfs_url_t structure

...and use it to parse and store network VFS options.

vfs_s_super structure now has a special member for network VFS options.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:57 +03:00
Andrew Borodin fcfa76be3d Merge branch '2541_save_setup'
* 2541_save_setup:
  (mc_config_new_or_override_file): create file w/o O_SYNC flag.
  (save_setup_cmd): remove home directory and password
  Optimization of history load.
  Optimization of history save.
  Event system: added addition parameter event_init_data to mc_event_del() function.
  Added event_group member to the Dlg_head structure
  (history_save): new function to save widget history
  "Layout" dialog window: remove "Save" button
  src/filemanager/option.c: minor optimization and includes clean up.
  "Panel options" dialog window: remove "Save" button
  "Configure options" dialog window: remove "Save" button
  Ticket #2541: MC saves configuration many times.
2011-06-21 16:15:43 +04:00
Andrew Borodin ccd42c0fab (mc_config_new_or_override_file): create file w/o O_SYNC flag.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-06-21 16:13:10 +04:00