mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +03:00
(extfs_get_path_mangle): minor optimization.
Avoid string allocation if it is really unneeded. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
ff26359af3
commit
bd31aa273d
@ -675,15 +675,11 @@ extfs_get_path_int (const vfs_path_t * vpath, struct archive **archive, gboolean
|
||||
|
||||
path_element = vfs_path_get_by_index (vpath, -1);
|
||||
|
||||
archive_name = vfs_path_to_str_elements_count (vpath, -1);
|
||||
|
||||
fstype = extfs_which (path_element->class, path_element->vfs_prefix);
|
||||
|
||||
if (fstype == -1)
|
||||
{
|
||||
g_free (archive_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
archive_name = vfs_path_to_str_elements_count (vpath, -1);
|
||||
|
||||
/*
|
||||
* All filesystems should have some local archive, at least
|
||||
|
Loading…
Reference in New Issue
Block a user