Page MenuHomePhabricator

exactness: use convinience ecore_file function to get dir
ClosedPublic

Authored by stefan_schmidt on Apr 17 2020, 6:53 AM.

Details

Summary

Instead of doing our own parsing here we should use ecore_file_dir_get()
which uses dirname() already to solve this.

CID: 1422196

Depends on D11726

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
stefan_schmidt created this revision.Apr 17 2020, 6:53 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

I am wondering if we coudln't use just dirname... that should also handle all the escaping correctly, which is not the case here i think.

That could make sense. I can have a look tomorrow.

Dirname has its quirks (some implementatiosn modify the inout, etc) but we already have ecore_file_dir_get() :-) Changing it now.

stefan_schmidt retitled this revision from exactness: handle NULL retrun from strrchr() to exactness: use convinience ecore_file function to get dir.
stefan_schmidt edited the summary of this revision. (Show Details)

witch to ecore_file_dir_get

zmike requested changes to this revision.Apr 21 2020, 6:55 AM

From memory, I think path now needs to be freed.

This revision now requires changes to proceed.Apr 21 2020, 6:55 AM

free up return

Your memory serves you right.

bu5hm4n accepted this revision.Apr 23 2020, 2:55 AM
This revision was not accepted when it landed; it landed in state Needs Review.Apr 23 2020, 4:07 AM
This revision was automatically updated to reflect the committed changes.