|
Rockbox mail archiveSubject: Read only files in windowsRead only files in windows
From: BlueChip <cs_bluechip_at_webtribe.net>
Date: Wed, 07 Jul 2004 19:20:38 +0100 I have noticed that any files created under windows by the simulator end up being read only. I did a search and found exactly what I needed (don't you just love google) http://www.cygwin.com/ml/cygwin/2003-11/msg00469.html A copy of the post at that link is below... BC >I got a question wrt to gcc and cygwin. I'm not sure if this is the defined >behaviour, but for some reason, the following code fails. This is a test >program which display the failure. >Running cygwin on windows 2000. Compiling with mingw (no-cygwin option) > >Basically, after creat...close... the file is set to read only (check >attributes under windows). This causes the second to fail. On the second run >of the program, the creat fails as well. Any idea why the file is being set to >read only? > >******************************************************** >#include <io.h> >#include <stdio.h> >#include <fcntl.h> > >int main() >{ > int handle; > handle= creat("hello.txt", O_WRONLY); ^^^^^^^^ This isn't the correct argument for creat. The second argument is the mode, as in what you send to chmod (2). _______________________________________________ http://cool.haxx.se/mailman/listinfo/rockbox Received on 2004-07-07 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |