Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7949e7e

Browse files
Randomize temporary sketch copy directory name
When a sketch has unsaved changes, a temporary copy of the sketch is made with those changes applied. This copy is then passed to arduino-builder. Previously, the name of this directory contained a hash of the main sketch filename, so the same directory would be used between builds. Now that this directory is deleted after every build, it can just use a randomized directory name, which is what this commit does. Addtionally, the prefix used for generating the name is changed from "arduino_" to "arduino_modified_sketch_" to make it slightly clearer what the directory is for (just in case it somehow survives the build, or a user sees it during the build).
1 parent 1029e0b commit 7949e7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎app/src/processing/app/Sketch.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ private String build(String buildPath, boolean verbose, boolean save) throws Run
11191119
}
11201120

11211121
private String saveSketchInTempFolder() throws IOException {
1122-
File tempFolder = FileUtils.createTempFolder("arduino_", DigestUtils.md5Hex(data.getMainFilePath()));
1122+
File tempFolder = FileUtils.createTempFolder("arduino_modified_sketch_");
11231123
FileUtils.copy(getFolder(), tempFolder);
11241124

11251125
for (SketchCode sc : Stream.of(data.getCodes()).filter(SketchCode::isModified).collect(Collectors.toList())) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /