(Domain.dnsMaster ()))
val _ = Domain.registerAfter
- (fn _ => Option.app TextIO.closeOut (!dns))
+ (fn _ => (Option.app TextIO.closeOut (!dns);
+ dns := NONE))
val dl = ErrorMsg.dummyLoc
val fname = OS.Path.joinDirFile {dir = Config.Bind.zonePath,
file = fname}
in
- OS.FileSys.remove fname
+ Slave.shellF ([Config.rm, " -f ", fname],
+ fn cl => "Error deleting file: " ^ cl)
end
else
let
TextIO.output (outf, Int.toString min);
TextIO.output (outf, " )\n\n");
TextIO.closeOut outf;
- Slave.shellF ([Config.cat, " ", dns, " >>", fname],
- fn cl => "Error concatenating file: " ^ cl);
+ if Posix.FileSys.access (dns, []) then
+ Slave.shellF ([Config.cat, " ", dns, " >>", fname],
+ fn cl => "Error concatenating file: " ^ cl)
+ else
+ ();
didDomain := #domain fs
end
in