summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/eio/eio_dir.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/eio/eio_dir.c b/src/lib/eio/eio_dir.c
index 0ae68befde..076d337764 100644
--- a/src/lib/eio/eio_dir.c
+++ b/src/lib/eio/eio_dir.c
@@ -274,7 +274,7 @@ _eio_dir_link(Ecore_Thread *thread, Eio_Dir_Copy *order,
274 /* recreate all links */ 274 /* recreate all links */
275 EINA_LIST_FOREACH(order->links, l, ln) 275 EINA_LIST_FOREACH(order->links, l, ln)
276 { 276 {
277 ssize_t length; 277 ssize_t length = -1;
278 278
279 eina_strbuf_reset(oldpath); 279 eina_strbuf_reset(oldpath);
280 280
@@ -299,7 +299,8 @@ _eio_dir_link(Ecore_Thread *thread, Eio_Dir_Copy *order,
299 } 299 }
300 300
301 /* read link target */ 301 /* read link target */
302 length = readlink(ln, target, bsz); 302 if (target)
303 length = readlink(ln, target, bsz);
303 if (length < 0) 304 if (length < 0)
304 goto on_error; 305 goto on_error;
305 306