mirror of https://github.com/MidnightCommander/mc
(vfs_stamp_path): get rid of path conversion.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
b4e0bf13c8
commit
ba6845f2d6
|
@ -190,18 +190,15 @@ vfs_rmstamp (struct vfs_class *v, vfsid id)
|
|||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
vfs_stamp_path (const char *path)
|
||||
vfs_stamp_path (const vfs_path_t * vpath)
|
||||
{
|
||||
vfsid id;
|
||||
vfs_path_t *vpath;
|
||||
const vfs_path_element_t *path_element;
|
||||
|
||||
vpath = vfs_path_from_str (path);
|
||||
path_element = vfs_path_get_by_index (vpath, -1);
|
||||
|
||||
id = vfs_getid (vpath);
|
||||
vfs_addstamp (path_element->class, id);
|
||||
vfs_path_free (vpath);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
|
|
@ -264,7 +264,7 @@ const char *vfs_translate_path (const char *path);
|
|||
/* return new string */
|
||||
char *vfs_translate_path_n (const char *path);
|
||||
|
||||
void vfs_stamp_path (const char *path);
|
||||
void vfs_stamp_path (const vfs_path_t * path);
|
||||
|
||||
void vfs_release_path (const vfs_path_t * vpath);
|
||||
|
||||
|
|
|
@ -899,18 +899,16 @@ done_mc (void)
|
|||
* We sync the profiles since the hotlist may have changed, while
|
||||
* we only change the setup data if we have the auto save feature set
|
||||
*/
|
||||
const char *curr_dir;
|
||||
|
||||
save_setup (auto_save_setup, panels_options.auto_save_setup);
|
||||
|
||||
curr_dir = vfs_get_current_dir ();
|
||||
vfs_stamp_path (curr_dir);
|
||||
vfs_stamp_path (vfs_get_raw_current_dir ());
|
||||
|
||||
if ((current_panel != NULL) && (get_current_type () == view_listing))
|
||||
vfs_stamp_path (vfs_path_as_str (current_panel->cwd_vpath));
|
||||
vfs_stamp_path (current_panel->cwd_vpath);
|
||||
|
||||
if ((other_panel != NULL) && (get_other_type () == view_listing))
|
||||
vfs_stamp_path (vfs_path_as_str (other_panel->cwd_vpath));
|
||||
vfs_stamp_path (other_panel->cwd_vpath);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
|
Loading…
Reference in New Issue