File tree Expand file tree Collapse file tree
src/main/java/i18nupdatemod/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,19 +10,23 @@ public class FileUtil {
1010 private static Path temporaryDirPath ;
1111
1212 public static void setResourcePackDirPath (Path path ) {
13+ saveMakeDir (path );
1314 resourcePackDirPath = path ;
1415 }
1516
1617 public static void setTemporaryDirPath (Path temporaryDirPath ) {
18+ saveMakeDir (temporaryDirPath );
19+ FileUtil .temporaryDirPath = temporaryDirPath ;
20+ }
21+
22+ private static void saveMakeDir (Path path ) {
1723 try {
18- //Make tmp dir
19- if (!Files .isDirectory (temporaryDirPath )) {
20- Files .createDirectories (temporaryDirPath );
24+ if (!Files .isDirectory (path )) {
25+ Files .createDirectories (path );
2126 }
2227 } catch (Exception e ) {
2328 Log .warning ("Cannot create dir: " + e );
2429 }
25- FileUtil .temporaryDirPath = temporaryDirPath ;
2630 }
2731
2832 public static Path getResourcePackPath (String filename ) {
You can’t perform that action at this time.
0 commit comments