File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.1.0) # Threads::Threads
22
33project (fastfetch
4- VERSION 1.1.0
4+ VERSION 1.1.1
55 LANGUAGES C
66)
77
88#e.g. +1
99#This allows to track builds between versions, without GitHub creating a new release
10- set (PROJECT_VERSION_EXTRA "+1 " )
10+ set (PROJECT_VERSION_EXTRA "" )
1111
1212include (GNUInstallDirs)
1313
Original file line number Diff line number Diff line change @@ -246,9 +246,10 @@ void ffCacheValidate(FFinstance* instance)
246246 ffStrbufInit (& content );
247247 ffAppendFileContent (path .chars , & content );
248248
249- if (ffStrbufCompS (& content , FASTFETCH_PROJECT_VERSION ) == 0 )
249+ bool isSameVersion = ffStrbufCompS (& content , FASTFETCH_PROJECT_VERSION ) == 0 ;
250+ ffStrbufDestroy (& content );
251+ if (isSameVersion )
250252 {
251- ffStrbufDestroy (& content );
252253 ffStrbufDestroy (& path );
253254 return ;
254255 }
@@ -261,7 +262,6 @@ void ffCacheValidate(FFinstance* instance)
261262 ffWriteFileContent (path .chars , & version );
262263 ffStrbufDestroy (& version );
263264
264- ffStrbufDestroy (& content );
265265 ffStrbufDestroy (& path );
266266}
267267
@@ -409,7 +409,7 @@ bool ffWriteFDContent(int fd, const FFstrbuf* content)
409409
410410void ffWriteFileContent (const char * fileName , const FFstrbuf * content )
411411{
412- int fd = open (fileName , O_WRONLY | O_CREAT , S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH );
412+ int fd = open (fileName , O_WRONLY | O_CREAT | O_TRUNC , S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH );
413413 if (fd == -1 )
414414 return ;
415415
You can’t perform that action at this time.
0 commit comments