summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--legacy/ecore/src/lib/ecore_file/ecore_file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file.c b/legacy/ecore/src/lib/ecore_file/ecore_file.c
index 8c2c8c646a..c0298084f8 100644
--- a/legacy/ecore/src/lib/ecore_file/ecore_file.c
+++ b/legacy/ecore/src/lib/ecore_file/ecore_file.c
@@ -459,6 +459,11 @@ ecore_file_realpath(const char *file)
459{ 459{
460 char buf[PATH_MAX]; 460 char buf[PATH_MAX];
461 461
462 /*
463 * Some implementations of realpath do not conform to the SUS.
464 * And as a result we must prevent a null arg from being passed.
465 */
466 if (!file) return strdup("");
462 if (!realpath(file, buf)) return strdup(""); 467 if (!realpath(file, buf)) return strdup("");
463 468
464 return strdup(buf); 469 return strdup(buf);