(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:
Andrew Borodin 2012-03-11 13:36:58 +03:00 committed by Slava Zanko
parent ff26359af3
commit bd31aa273d

View File

@ -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