aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jim-file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/jim-file.c b/jim-file.c
index 053873c..8214437 100644
--- a/jim-file.c
+++ b/jim-file.c
@@ -267,12 +267,13 @@ static int file_cmd_normalize(Jim_Interp *interp, int argc, Jim_Obj *const *argv
if (realpath(path, newname)) {
Jim_SetResult(interp, Jim_NewStringObjNoAlloc(interp, newname, -1));
+ return JIM_OK;
}
else {
Jim_Free(newname);
- Jim_SetResult(interp, argv[0]);
+ Jim_SetResultFormatted(interp, "can't normalize \"%#s\": %s", argv[0], strerror(errno));
+ return JIM_ERR;
}
- return JIM_OK;
#else
Jim_SetResultString(interp, "Not implemented", -1);
return JIM_ERR;