Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31fa09c1 authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Fix Windows build.

Only two days in, and I'm already really regretting putting this code
somewhere that builds for Mac OS and Windows...

Change-Id: I576ee4a9e647e10dc2d47c7e1e38aedee2bf404c
parent 051f369a
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -70,6 +70,7 @@ static bool CleanUpAfterFailedWrite(const std::string& path) {
  return false;
  return false;
}
}


#if !defined(_WIN32)
bool android::WriteStringToFile(const std::string& content, const std::string& path,
bool android::WriteStringToFile(const std::string& content, const std::string& path,
                                mode_t mode, uid_t owner, gid_t group) {
                                mode_t mode, uid_t owner, gid_t group) {
  int fd = TEMP_FAILURE_RETRY(open(path.c_str(),
  int fd = TEMP_FAILURE_RETRY(open(path.c_str(),
@@ -85,6 +86,7 @@ bool android::WriteStringToFile(const std::string& content, const std::string& p
  }
  }
  return CleanUpAfterFailedWrite(path);
  return CleanUpAfterFailedWrite(path);
}
}
#endif


bool android::WriteStringToFile(const std::string& content, const std::string& path) {
bool android::WriteStringToFile(const std::string& content, const std::string& path) {
  int fd = TEMP_FAILURE_RETRY(open(path.c_str(),
  int fd = TEMP_FAILURE_RETRY(open(path.c_str(),