зеркало из https://github.com/mozilla/pluotsorbet.git
Don't create file in RandomAccessStream::open if mode is READ
This commit is contained in:
Родитель
459aab7762
Коммит
d355e8cffa
|
@ -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) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче