Skip to content

Commit

Permalink
Merge pull request #2193 from CKY-/v5-Write-File-Path
Browse files Browse the repository at this point in the history
Feat: write file path
  • Loading branch information
itsjesski committed Sep 15, 2023
2 parents ee8b3ca + 44d61f7 commit aa1e7ef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/backend/common/handlers/fileWriterProcessor.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use strict";

const fs = require("fs-extra");
const path = require("path");
const logger = require("../../logwrapper");

function doesTextExistInFile(filepath, text) {
Expand Down Expand Up @@ -75,6 +76,7 @@ exports.run = async effect => {
fs.appendFileSync(effect.filepath, text + "\n", "utf8");
}
} else {
fs.ensureDirSync(path.dirname(effect.filepath));
fs.appendFileSync(effect.filepath, text + "\n", "utf8");
}
} else if (effect.writeMode === "delete") {
Expand Down

0 comments on commit aa1e7ef

Please sign in to comment.