Przeglądaj źródła

'light_isWritable' shouldn't truncate file contents

Abdullah ibn Nadjo 6 lat temu
rodzic
commit
12e81769d9
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1
    1
      src/helpers.c

+ 1
- 1
src/helpers.c Wyświetl plik

@@ -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
   {