Skip to content

Commit

Permalink
Add in stat after chmod
Browse files Browse the repository at this point in the history
  • Loading branch information
Todd Martin authored and Todd Martin committed Oct 8, 2021
1 parent 6a63daf commit 77db4f4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ut_assert/src/uttools.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ bool UtMem2BinFile(const void *Memory, const char *Filename, uint32 Length)

if ((stat(Filename, &dststat) == 0)) {
if ((chmod(Filename, dststat.st_mode & ~(S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH)) == 0)) {
stat(Filename, &dststat);
if ((fp = fopen(Filename, "w"))) {
fwrite(Memory, Length, 1, fp);
fclose(p);
Expand Down

0 comments on commit 77db4f4

Please sign in to comment.