File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -321,8 +321,16 @@ hwloc_utils_enable_input_format(struct hwloc_topology *topology, unsigned long f
321321 snprintf (umntcmd , sizeof (umntcmd ), "umount -l %s" , mntpath );
322322
323323 /* enter the mount point and stay there so that we can umount+rmdir immediately but still use it later */
324- chdir (mntpath );
325- system (umntcmd );
324+ if (chdir (mntpath ) < 0 ) {
325+ perror ("Entering the archivemount'ed archive" );
326+ if (system (umntcmd ) < 0 )
327+ perror ("Unmounting the archivemount'ed archive (ignored)" );
328+ rmdir (mntpath );
329+ close (sub_input_format .oldworkdir );
330+ return EXIT_FAILURE ;
331+ }
332+ if (system (umntcmd ) < 0 )
333+ perror ("Unmounting the archivemount'ed archive (ignored)" );
326334 rmdir (mntpath );
327335
328336 /* there should be a single subdirectory in the archive */
You can’t perform that action at this time.
0 commit comments