Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix mkdir on JVM on Windows.
  • Loading branch information
jnthn committed Sep 25, 2013
1 parent 9591fa8 commit bd3d68a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
Expand Up @@ -727,8 +727,12 @@ public static String chdir(String path, ThreadContext tc) {

public static long mkdir(String path, long mode, ThreadContext tc) {
try {
Files.createDirectory(Paths.get(path),
PosixFilePermissions.asFileAttribute(modeToPosixFilePermission(mode)));
String os = System.getProperty("os.name").toLowerCase();
if (os.indexOf("win") >= 0)
Files.createDirectory(Paths.get(path));
else
Files.createDirectory(Paths.get(path),
PosixFilePermissions.asFileAttribute(modeToPosixFilePermission(mode)));
}
catch (Exception e) {
die_s(IOExceptionMessages.message(e), tc);
Expand Down

0 comments on commit bd3d68a

Please sign in to comment.