Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix seekfh failures on JVM backend.
  • Loading branch information
donaldh committed May 16, 2014
1 parent 616e461 commit 53eae59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vm/jvm/runtime/org/perl6/nqp/io/FileHandle.java
Expand Up @@ -50,13 +50,15 @@ public void seek(ThreadContext tc, long offset, long whence) {
fc.position(fc.position() + offset);
break;
case 2:
fc.position(fc.size());
fc.position(fc.size() + offset);
break;
default:
throw ExceptionHandling.dieInternal(tc, "Invalid seek mode");
}
} catch (IOException e) {
throw ExceptionHandling.dieInternal(tc, e);
} catch (IllegalArgumentException e) {
throw ExceptionHandling.dieInternal(tc, e);
}
}

Expand Down

0 comments on commit 53eae59

Please sign in to comment.