Selaa lähdekoodia

'light_isWritable' shouldn't truncate file contents

Abdullah ibn Nadjo 9 vuotta sitten
vanhempi
commit
12e81769d9
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1
    1
      src/helpers.c

+ 1
- 1
src/helpers.c Näytä tiedosto

182
 
182
 
183
 LIGHT_BOOL light_isWritable(char const * filename)
183
 LIGHT_BOOL light_isWritable(char const * filename)
184
 {
184
 {
185
-  FILE* fileHandle = fopen(filename, "w");
185
+  FILE* fileHandle = fopen(filename, "r+");
186
 
186
 
187
   if(!fileHandle)
187
   if(!fileHandle)
188
   {
188
   {