Don't create file in RandomAccessStream::open if mode is READ

This commit is contained in:
Marco Castelluccio 2014-12-31 01:24:50 +01:00
Родитель 459aab7762
Коммит d355e8cffa
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -603,6 +603,8 @@ Native.create("com/sun/midp/io/j2me/storage/RandomAccessStream.open.(Ljava/lang/
fs.exists(path, function(exists) { fs.exists(path, function(exists) {
if (exists) { if (exists) {
open(); open();
} else if (mode == 1) {
reject(new JavaException("java/io/IOException", "RandomAccessStream::open(" + path + ") file doesn't exist"));
} else { } else {
fs.create(path, new Blob(), function(created) { fs.create(path, new Blob(), function(created) {
if (created) { if (created) {