소스 검색

'light_isWritable' shouldn't truncate file contents

Abdullah ibn Nadjo 7 년 전
부모
커밋
12e81769d9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      src/helpers.c

+ 1
- 1
src/helpers.c 파일 보기

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
   {