diff options
Diffstat (limited to 'gnu/libexec/uucp/libunix/corrup.c')
-rw-r--r-- | gnu/libexec/uucp/libunix/corrup.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gnu/libexec/uucp/libunix/corrup.c b/gnu/libexec/uucp/libunix/corrup.c new file mode 100644 index 000000000000..87f19e668894 --- /dev/null +++ b/gnu/libexec/uucp/libunix/corrup.c @@ -0,0 +1,33 @@ +/* corrup.c + Save a file in the .Corrupt directory. */ + +#include "uucp.h" + +#include "sysdep.h" +#include "uudefs.h" +#include "system.h" + +char * +zsysdep_save_corrupt_file (zfile) + const char *zfile; +{ + const char *zslash; + char *zto; + + zslash = strrchr (zfile, '/'); + if (zslash == NULL) + zslash = zfile; + else + ++zslash; + + zto = zsappend3 (zSspooldir, CORRUPTDIR, zslash); + + if (! fsysdep_move_file (zfile, zto, TRUE, FALSE, FALSE, + (const char *) NULL)) + { + ubuffree (zto); + return NULL; + } + + return zto; +} |