Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
feature(): enable folderNames in name template
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonso-presa authored and diemol committed Dec 9, 2019
1 parent d04b227 commit 7c5a644
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public void buildVideoFileName() {
.replace("{platform}", this.platform)
.replace("{timestamp}", commonProxyUtilities.getDateAndTimeFormatted(this.timestamp))
.replace("{testStatus}", getTestStatus().toString())
.replaceAll("[^a-zA-Z0-9]", "_");
.replaceAll("[^a-zA-Z0-9/\\-]", "_");

this.fileName = FILE_NAME_TEMPLATE.replace("{fileName}", testNameNoExtension)
.replace("{fileExtension}", fileExtension);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,8 +638,8 @@ void copyVideos(final String containerId) {
testInformation.setFileExtension(fileExtension);
Path videoFile = Paths.get(String.format("%s/%s", testInformation.getVideoFolderPath(),
testInformation.getFileName()));
if (!Files.exists(Paths.get(testInformation.getVideoFolderPath()))) {
Files.createDirectories(Paths.get(testInformation.getVideoFolderPath()));
if (!Files.exists(videoFile.getParent())) {
Files.createDirectories(videoFile.getParent());
}
Files.copy(tarStream, videoFile);
CommonProxyUtilities.setFilePermissions(videoFile);
Expand Down

0 comments on commit 7c5a644

Please sign in to comment.