Browse Source

'light_isWritable' shouldn't truncate file contents

Abdullah ibn Nadjo 8 years ago
parent
commit
12e81769d9
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/helpers.c

+ 1
- 1
src/helpers.c View File

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
   {