summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index b2196a6..67f78a7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -517,8 +517,12 @@ int main(int argc, char **argv)
}
if (unpack) {
- if (reverseto)
- chdir(reverseto);
+ if (reverseto) {
+ if (chdir(reverseto) < 0) {
+ printf("Error: Cannot change directory to %s\n", reverseto);
+ return 1;
+ }
+ }
unpack_fiasco_image(fiasco_image);
return 0;
}