changes
This commit is contained in:
+3
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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"));
|
||||
}
|
||||
Reference in New Issue
Block a user