adaptivecomputing/torque

remtree shouldn't return error when file/dir does not exists

Opened this issue · 0 comments

We have an epilogue script that does a lot of cleanup, incl the job tempdir. but this also causes errors in the pbs_mom output when the mom tries to remove the already removed tempdir.

looking at the code, it appears that the remtree function in https://github.com/adaptivecomputing/torque/blob/master/src/resmom/mom_job_func.c#L307 returns an error when the file/dir does not exist.
that might make sense, but if the objective is to remove something, the end result should be that the file/dir doesn't exist anymore, and thus, one could argue that if the file/dir didn't exist in the first place, this is ok.