aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hotload.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/hotload.c b/src/hotload.c
index f4d7b44..88d286a 100644
--- a/src/hotload.c
+++ b/src/hotload.c
@@ -93,17 +93,8 @@ resolve_symlink(const char *file)
return copy_string(file);
}
- ssize_t size = buffer.st_size + 1;
- char *result = (char *) malloc(size);
- ssize_t read = readlink(file, result, size);
-
- if (read != -1) {
- result[read] = '\0';
- return result;
- }
-
- free(result);
- return NULL;
+ char *result = realpath(file, NULL);
+ return result;
}
internal enum watch_kind