aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/cwd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/cwd.c b/core/cwd.c
index ab858c7..d984e6a 100644
--- a/core/cwd.c
+++ b/core/cwd.c
@@ -6,6 +6,12 @@ char buf[1024] = { 0 };
int main()
{
getcwd(buf, 1024);
- wstdf("%s\n", buf);
+
+ if (buf[0] == '/' && buf[1] == 0) {
+ wstdf("%s\n", buf);
+ } else {
+ wstdf("%s/\n", buf);
+ }
+
return 0;
}