Skip to content

Commit

Permalink
Create directories deeply
Browse files Browse the repository at this point in the history
  • Loading branch information
rahmanusta committed Oct 13, 2015
1 parent ba93046 commit 4294635
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/kodcu/component/DialogBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
public final class DialogBuilder extends TextDialog {

public final static String FILE_NAME_REGEX = "^[\\w\\-\\\\/]*\\.[\\w\\-]+$";
public final static String FOLDER_NAME_REGEX = "^[\\w\\-]*\\.*[\\w\\-]+$";
public final static String FOLDER_NAME_REGEX = "^[\\w\\-\\\\/]*\\.*[\\w\\-]+$";

public DialogBuilder(String content, String title) {
super(content, title);
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/com/kodcu/controller/ApplicationController.java
Original file line number Diff line number Diff line change
Expand Up @@ -2294,8 +2294,10 @@ public void createFolder(ActionEvent actionEvent) {


threadService.runTaskLater(() -> {
IOHelper.createDirectory(folderPath);
directoryService.changeWorkigDir(folderPath);
IOHelper.createDirectories(folderPath);
threadService.runActionLater(() -> {
directoryService.changeWorkigDir(folderPath);
});
});
}
};
Expand Down Expand Up @@ -2537,7 +2539,7 @@ public void newSlide(ActionEvent actionEvent) {
Path folderPath = path.resolve(folderName);

threadService.runTaskLater(() -> {
IOHelper.createDirectory(folderPath);
IOHelper.createDirectories(folderPath);
indikatorService.startProgressBar();
IOHelper.copyDirectory(configPath.resolve("slide/frameworks"), folderPath);
indikatorService.stopProgressBar();
Expand Down

0 comments on commit 4294635

Please sign in to comment.