Browse Source

'light_isWritable' shouldn't truncate file contents

Abdullah ibn Nadjo 7 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,7 +182,7 @@ LIGHT_BOOL light_isDir(char const * path)
182 182
 
183 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 187
   if(!fileHandle)
188 188
   {