/* rmdir.c (rsxnt) -- Copyright (c) 1996-1997 Rainer Schnitker */

#include "rsxnt.h"

int __rmdir(const char *name)
{
    char fname[512];

    _rsxnt_truncate_name (fname, name);

    if (_rsxnt_get_process_ptr()->bConsoleApp)
        OemToChar(fname, fname);

    if (RemoveDirectory(fname) == FALSE)
        return _rsxnt_get_last_errno();
    else
        return 0;
}
