This commit is contained in:
Josh Ashton
2023-08-03 10:52:40 -06:00
parent fbf5b4308d
commit c43e89cff3
8 changed files with 37 additions and 70 deletions
BIN
View File
Binary file not shown.
+3 -1
View File
@@ -42,7 +42,9 @@ void validateDir(char input[]) {
printf("cwd: %s\n", cwd);
}
chdir("..");
printf("cwd: %s", cwd);
if(getcwd(cwd, sizeof(cwd)) != NULL) {
printf("cwd: %s\n", cwd);
}
}
}
BIN
View File
Binary file not shown.
-9
View File
@@ -1,9 +0,0 @@
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
int main() {
printf("%s", getenv("CWD"));
chdir("/home/jashton/dev");
printf("%s", getenv("CWD"));
}