Commit 461652945cb02d1cfa68eade88db87f6e0856b86
1 parent
88f8e42ea8
Exists in
master
and in
2 other branches
파일 쓰기 후 바로 sync하도록 수정
Showing
1 changed file
with
11 additions
and
0 deletions
Show diff stats
app/gui/oven_control/cookhistory.cpp
1 | #include "cookhistory.h" | 1 | #include "cookhistory.h" |
2 | 2 | ||
3 | +#include "unistd.h" | ||
4 | + | ||
3 | #include "autocookwindow.h" | 5 | #include "autocookwindow.h" |
4 | #include "manualcookwindow.h" | 6 | #include "manualcookwindow.h" |
5 | #include "manualcooksettingwidget.h" | 7 | #include "manualcooksettingwidget.h" |
@@ -368,6 +370,9 @@ void writeCounts() | @@ -368,6 +370,9 @@ void writeCounts() | ||
368 | 370 | ||
369 | stream << "\n"; | 371 | stream << "\n"; |
370 | } | 372 | } |
373 | + | ||
374 | + file.close(); | ||
375 | + sync(); | ||
371 | } | 376 | } |
372 | 377 | ||
373 | void appendRecent(RecentsEntry e) | 378 | void appendRecent(RecentsEntry e) |
@@ -665,6 +670,9 @@ void writeRecents() | @@ -665,6 +670,9 @@ void writeRecents() | ||
665 | break; | 670 | break; |
666 | } | 671 | } |
667 | } | 672 | } |
673 | + | ||
674 | + file.close(); | ||
675 | + sync(); | ||
668 | } | 676 | } |
669 | 677 | ||
670 | void appendFavorite(FavoritesEntry e) | 678 | void appendFavorite(FavoritesEntry e) |
@@ -979,6 +987,9 @@ void writeFavorites() | @@ -979,6 +987,9 @@ void writeFavorites() | ||
979 | break; | 987 | break; |
980 | } | 988 | } |
981 | } | 989 | } |
990 | + | ||
991 | + file.close(); | ||
992 | + sync(); | ||
982 | } | 993 | } |
983 | 994 | ||
984 | bool initialized = false; | 995 | bool initialized = false; |