Skip to content

Commit 06cbb4d

Browse files
committed
Use new convention with file name
1 parent 712ccfb commit 06cbb4d

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

modules/io.mjs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3927,9 +3927,8 @@ class TLocalFile extends TFile {
39273927
this.fUseStampPar = false;
39283928
this.fLocalFile = file;
39293929
this.fEND = file.size;
3930-
this.fFullURL = file.name;
3931-
this.fURL = file.name;
3932-
this.fFileName = file.name;
3930+
this.fFullURL = this.fURL = file.name;
3931+
this.assignFileName(file.name);
39333932
}
39343933

39353934
/** @summary Open local file
@@ -3997,10 +3996,10 @@ class TNodejsFile extends TFile {
39973996
this.fs = fs;
39983997

39993998
return new Promise((resolve, reject) => {
4000-
this.fs.open(this.fFileName, 'r', (status, fd) => {
3999+
this.fs.open(this.fFullURL, 'r', (status, fd) => {
40014000
if (status) {
40024001
console.log(status.message);
4003-
reject(Error(`Not possible to open ${this.fFileName} inside node.js`));
4002+
reject(Error(`Not possible to open ${this.fFullURL} inside node.js`));
40044003
} else {
40054004
const stats = this.fs.fstatSync(fd);
40064005
this.fEND = stats.size;
@@ -4022,7 +4021,7 @@ class TNodejsFile extends TFile {
40224021
}
40234022

40244023
if (!this.fs || !this.fd) {
4025-
reject(Error(`File is not opened ${this.fFileName}`));
4024+
reject(Error(`File is not opened ${this.fFullURL}`));
40264025
return;
40274026
}
40284027

@@ -4105,7 +4104,7 @@ class TProxyFile extends TFile {
41054104
return Promise.reject(Error(`Cannot access other file ${filename}`));
41064105

41074106
if (!this.proxy)
4108-
return Promise.reject(Error(`File is not opened ${this.fFileName}`));
4107+
return Promise.reject(Error(`File is not opened ${this.fFullURL}`));
41094108

41104109
if (isFunc(this.proxy.readBuffers)) {
41114110
return this.proxy.readBuffers(place).then(arr => {

0 commit comments

Comments
 (0)