summaryrefslogtreecommitdiffstats
path: root/library/cpp/tvmauth/client/misc/disk_cache.cpp
diff options
context:
space:
mode:
authordimaandreev <[email protected]>2022-02-10 16:49:30 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:49:30 +0300
commit2ed758579191810ed2ee20ed5d3d3087de7ad1ff (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/tvmauth/client/misc/disk_cache.cpp
parente7b1f21afb7d922ce8aff97a44f7f5385d33051f (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/tvmauth/client/misc/disk_cache.cpp')
-rw-r--r--library/cpp/tvmauth/client/misc/disk_cache.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/tvmauth/client/misc/disk_cache.cpp b/library/cpp/tvmauth/client/misc/disk_cache.cpp
index 7f991f6e56f..3c01be4a837 100644
--- a/library/cpp/tvmauth/client/misc/disk_cache.cpp
+++ b/library/cpp/tvmauth/client/misc/disk_cache.cpp
@@ -10,7 +10,7 @@
#include <util/stream/file.h>
#include <util/stream/str.h>
#include <util/system/fs.h>
-#include <util/system/sysstat.h>
+#include <util/system/sysstat.h>
#include <util/system/tempfile.h>
#include <exception>
@@ -122,12 +122,12 @@ namespace NTvmAuth {
try {
{
- if (NFs::Exists(Filename_)) {
- Chmod(Filename_.c_str(),
- S_IRUSR | S_IWUSR); // 600
- }
-
- TFile file(Filename_, CreateAlways | WrOnly | Seq | AWUser | ARUser);
+ if (NFs::Exists(Filename_)) {
+ Chmod(Filename_.c_str(),
+ S_IRUSR | S_IWUSR); // 600
+ }
+
+ TFile file(Filename_, CreateAlways | WrOnly | Seq | AWUser | ARUser);
file.Flock(LOCK_EX | LOCK_NB);
TFileOutput output(file);