Commit Graph

21 Commits

Author SHA1 Message Date
Carsten Haitzler 3163458619 eina vpath - fix windows ~username handling to only error when used
we would always rrturn 0 on windows ... missing  {} in block. fix that.

@fix
2020-07-30 11:14:41 +01:00
Carsten Haitzler 56e2e21ae7 ecore_file - address issue about false positive of finding a file in ./
it may report an exe is installed if it happens to be in cwd but cwd
isnt in path. the "full/relative" path handling case mishandled this.
fixes T8678

@fix
2020-04-22 12:51:50 +01:00
Wonki Kim 979757c845 eina_vpath: add null checking logic on vpath_resolve api
Summary:
there is a patch that add vpath_resolve() call before eina_file_open()
because `path` arg could be NULL, the patch kills some applications.
this patch add null checking logic on vpath_resolve api

Reviewers: bu5hm4n, cedric, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9748
2019-08-27 20:25:02 +09:00
Vincent Torri a6ade14c5e Evil: remove pwd code in Evil and fix compilation failures after the removal
Summary: remove pwd code in Evil

Test Plan: compilation

Reviewers: zmike, cedric, raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9420
2019-07-28 09:27:27 +01:00
Vincent Torri 89db9df2d2 Eina vpath: remove support of ~username vpath on Windows
On Windows, one must be in kernel mode to obtain informations of other users

Reviewed-by: Carsten Haitzler (Rasterman) <rasterman.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9339
2019-07-18 09:36:25 +02:00
Cedric BAIL 370917751f eina: update vpath to also support a more classic syntax for variable.
This enable vpath to recognize also ${} as a variable. It does mimic
what Efl.ViewModel provide with Efl.ViewModel.PropertyText and various
other language.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8883
2019-05-11 08:52:07 -07:00
Cedric BAIL 9c992c05d5 eina: refactor and simplify vpath.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8882
2019-05-11 08:52:05 -07:00
Marcel Hollerbach 60af618098 eina_vpath do not pass things through snprintf when not expected.
lets assume a user passes in a string like "blabla%dehydra" then %d will
be resolved by snprintf. Which is probebly not what we want. This
resolves this case and ensures that eina_vpath_resolve does not get
piped through snprintf

Reviewed-by: Dave Andreoli <dave@gurumeditation.it>
Differential Revision: https://phab.enlightenment.org/D8753
2019-04-27 12:31:39 +02:00
Vincent Torri a30caf333e eina_vpath: port to Windows
Test Plan: test example

Reviewers: raster, cedric, zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8633
2019-04-17 17:44:12 +01:00
Mike Blumenkrantz e7ebf92c92 eina: free vpath hash on shutdown
Summary: this resolves a considerable number of leaks in unit tests

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8020
2019-02-25 17:12:57 -05:00
Carsten Haitzler 0a2c3557cb eina vpath - warning - remove unused variable 2018-11-09 11:43:58 +00:00
Carsten Haitzler 2ec2d97356 eina vpath - warning - fix constness of string pointer
fixes bad const usage, butnot an actual bug.
2018-11-09 11:43:58 +00:00
Taehyub Kim 54c68e445b eina_vpath: fix the memory leak
Summary:
 fix the memory leak
@fix

Reviewers: Jaehyun_Cho, bu5hm4n

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7081
2018-09-21 15:05:58 +09:00
Marcel Hollerbach 7968a0d0b9 move efreet xdg envvars to eina
Summary:
The contents of the XDG_ env vars are also usefull for eina subsystems,
thus we should init those env vars here.

Depends on D6751

Reviewers: zmike, stefan_schmidt, #committers

Reviewed By: zmike, #committers

Subscribers: #reviewers, cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6744
2018-08-20 12:57:57 -04:00
Marcel Hollerbach e31ce7b287 eina_vpath: introduce eina_vpath in style of snprintf
Summary:
this can be usefull for later regactor usages.

Depends on D6742

Reviewers: zmike, stefan_schmidt, #committers

Reviewed By: zmike, #committers

Subscribers: #reviewers, segfaultxavi, cedric, #committers, zmike

Tags: PHID-PROJ-55rnlag4d454jfmlmuhu

Differential Revision: https://phab.enlightenment.org/D6743
2018-08-20 12:56:51 -04:00
Marcel Hollerbach aa416afffb eina_vpath: fix homedirectory fetching
Summary:
the fetching of the homedirectorty did not work. pw_dir was never
prepended. Additionally you would get a silent NULL string back
if the system does not support HAVE_GETPWENT.

ref T7107

Depends on D6737

Reviewers: zmike

Reviewed By: zmike

Subscribers: #reviewers, raster, vtorri, cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7107

Differential Revision: https://phab.enlightenment.org/D6742
2018-08-20 12:56:30 -04:00
Marcel Hollerbach ae51034b85 eina_vpath: include the config header
so the function detection macros are defined.
2018-02-26 12:21:56 +01:00
Carsten Haitzler 411e140eaf eina vpath - improve docs and add app.tmp and usr.tmp vpaths too
definitely kaes the docs better with lots of sample paths and some
indication of what these may map to in real life.
2018-02-23 16:26:30 +09:00
Cedric Bail b575c41676 eina: make eina_vpath_interface_user_set an internal API. 2018-02-22 14:57:36 -08:00
Marcel Hollerbach c4f33c67a8 move from efl.vpath to eina_vpath
The usages from efl.vpath are moved to to eina_vpath
2018-02-22 09:26:55 +01:00
Marcel Hollerbach 7165003bc6 introduce eina_vpath!
Its the successor of efl.vpath, the api is synchronous, and supports
addtional vpath paths, new apis cal always be added to use them.
2018-02-22 09:26:55 +01:00