From 06dd253e6eb2ea358da53dbf7dbef0680a958d24 Mon Sep 17 00:00:00 2001 From: Gregor Anich Date: Sun, 18 Jul 2004 21:15:47 +0000 Subject: [PATCH] Delete read-only files too. svn path=/trunk/; revision=10205 --- reactos/tools/rdel.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/reactos/tools/rdel.c b/reactos/tools/rdel.c index 0753ef88f00..b619c4c499b 100644 --- a/reactos/tools/rdel.c +++ b/reactos/tools/rdel.c @@ -1,4 +1,4 @@ -/* $Id: rdel.c,v 1.2 2003/11/10 19:29:24 mf Exp $ +/* $Id: rdel.c,v 1.3 2004/07/18 21:15:47 blight Exp $ * COPYRIGHT: See COPYING in the top level directory * PROGRAMMER: Rex Jolliff (rex@lvcablemodem.com) * PURPOSE: Platform independent delete command @@ -10,6 +10,11 @@ #include #include #include +#ifdef __WIN32__ +# include +#endif +#include +#include void convertPath (char * pathToConvert) @@ -73,6 +78,11 @@ main (int argc, char* argv[]) } else { +#ifdef __WIN32__ + _chmod (argv [idx], _S_IREAD | _S_IWRITE); +#else + chmod (argv [idx], 0666); +#endif returnCode = remove (argv [idx]); if (returnCode != 0 && errno != ENOENT) {