lots of long paths for monitoring file paths for icons etc. are in
memory for efreetd. this reduces that memory by sharing them much more.
@optimization
On Windows, both backslash and slash can be used as file path
separators. Therefore, it is fixed to consider backslash as a file path
separator as well on Windows.
@fix
On windows, stat() returns -1 if a path is finished with a \ or /,
so replace all stat() calls with a function which removes the trailing
slash or backslash on Windows
At this stage the code duplicate many code path for avoiding potential
borkage on Unix system. During 1.17 release cycle, it would be nice to
refactor this piece.
@fix
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
this should hugely improve the speed of file monitor event processing;
in my test case, 800,000+ monitors were present and the application was
entirely unable to process them
valgrind was most unhappy with ecore_file_app_exe_get(). like:
==8331== Invalid write of size 1
==8331== at 0x68DE90A: ecore_file_app_exe_get (ecore_file.c:994)
==8331== Address 0x1348e58f is 0 bytes after a block of size 31 alloc'd
==8331== at 0x4C28C20: malloc (vg_replace_malloc.c:296)
==8331== Invalid write of size 1
==8331== at 0x68DE948: ecore_file_app_exe_get (ecore_file.c:1000)
==8331== Address 0x1348e599 is 10 bytes after a block of size 31 alloc'd
==8331== at 0x4C28C20: malloc (vg_replace_malloc.c:296)
etc. etc. - so i rewrote it cleanly using strbuf to save code and
effort. cleaner now and ACTUALLY works correctly... and no valgrind
complaints.
@fix
Summary:
Added condition that if given path does not exist it returns NULL
@fix
Signed-off-by: kabeer khan <kabeer.khan@samsung.com>
Reviewers: englebass, devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1640
Summary:
Existing doc specifies that ecore_file_monitor_add returns NULL if path is not file.
Removed this line as it works if path is either file or directory.
Signed-off-by: kabeer khan <kabeer.khan@samsung.com>
Reviewers: devilhorns, englebass
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1635
Being annoyed by different types of eina critical macros - CRI, CRIT,
CRITICAL -, I concluded to unify them to one. Discussed on IRC and
finally, CRI was chosen to meet the consistency with other macros -
ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
this actually fixes the issue. coverity did point it out but i fixed
it incorrectly. since it was still there in the scan i now fixed it
properly. fixes CID 1039279
now that it's runtime dlopen'ed etc. ecore-con "always" has url
support via curl so ecore-file needs to assume that this can always
work and this just use ecore-con-url anyway.
instead of the previous mess, just define the functions with common
names and call the backend that was compiled in, similar to what eio
does.
also do not be silent on errors, use eina_safety_checks to issue warnings.
SVN revision: 80360
Another try to make inotify checks more common.
This time uses AC_CHECK_HEADERS() as for others, that already define
HAVE_SYS_INOTIFY_H, then uses that.
I still kept AM_CONDITIONAL([HAVE_INOTIFY]) because I plan to convert
ecore_file to the same, smarter, method that is used in eio (compiling
the file depending on the backend.
SVN revision: 80358