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

Commit 149cd75e authored by Yabin Cui's avatar Yabin Cui Committed by android-build-merger
Browse files

Merge "base: allow creating tempfile in a custom temporary dir." am: 665f1445 am: d773ceb2

am: 1d84dd39

Change-Id: I624204ae324a0285c65f9aea9350ceda66fc694a
parents fba439be 1d84dd39
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
class TemporaryFile {
 public:
  TemporaryFile();
  explicit TemporaryFile(const std::string& tmp_dir);
  ~TemporaryFile();

  // Release the ownership of fd, caller is reponsible for closing the
+4 −0
Original line number Diff line number Diff line
@@ -84,6 +84,10 @@ TemporaryFile::TemporaryFile() {
  init(GetSystemTempDir());
}

TemporaryFile::TemporaryFile(const std::string& tmp_dir) {
  init(tmp_dir);
}

TemporaryFile::~TemporaryFile() {
  if (fd != -1) {
    close(fd);