mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-26 23:01:05 +08:00
Fix Settings::OpenForReadingAndWriting using O_CREAT with no mode.
R=mark@chromium.org Review URL: https://codereview.chromium.org/997613002
This commit is contained in:
parent
7979d9db4e
commit
e4c8b6cc72
@ -30,15 +30,15 @@ namespace crashpad {
|
||||
struct ALIGNAS(4) Settings::Data {
|
||||
static const uint16_t kSettingsVersion = 1;
|
||||
|
||||
enum Options : uint32_t {
|
||||
kUploadsEnabled = 1 << 0,
|
||||
};
|
||||
|
||||
Data() : version(kSettingsVersion),
|
||||
options(0),
|
||||
last_upload_attempt_time(0),
|
||||
client_id() {}
|
||||
|
||||
enum Options : uint32_t {
|
||||
kUploadsEnabled = 1 << 0,
|
||||
};
|
||||
|
||||
uint32_t version;
|
||||
uint32_t options;
|
||||
uint64_t last_upload_attempt_time; // time_t
|
||||
@ -152,7 +152,7 @@ ScopedFileHandle Settings::OpenForReading() {
|
||||
|
||||
ScopedFileHandle Settings::OpenForReadingAndWriting() {
|
||||
ScopedFileHandle handle(HANDLE_EINTR(
|
||||
open(file_path(), O_RDWR | O_EXLOCK | O_CREAT)));
|
||||
open(file_path(), O_RDWR | O_EXLOCK | O_CREAT, 0644)));
|
||||
PLOG_IF(ERROR, !handle.is_valid()) << "open for writing";
|
||||
return handle.Pass();
|
||||
}
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include "client/settings.h"
|
||||
|
||||
#include "client/crash_report_database.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "util/file/file_io.h"
|
||||
#include "util/test/scoped_temp_dir.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user