Skip to content

Commit 5c12d4a

Browse files
committed
chore(fs/PrefixWrapper): _remote → _handler
1 parent d90b852 commit 5c12d4a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

@xen-orchestra/fs/src/abstract.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@ const ignoreEnoent = error => {
3434
}
3535

3636
class PrefixWrapper {
37-
constructor(remote, prefix) {
37+
constructor(handler, prefix) {
3838
this._prefix = prefix
39-
this._remote = remote
39+
this._handler = handler
4040
}
4141

4242
get type() {
43-
return this._remote.type
43+
return this._handler.type
4444
}
4545

4646
// necessary to remove the prefix from the path with `prependDir` option
4747
async list(dir, opts) {
48-
const entries = await this._remote.list(this._resolve(dir), opts)
48+
const entries = await this._handler.list(this._resolve(dir), opts)
4949
if (opts != null && opts.prependDir) {
5050
const n = this._prefix.length
5151
entries.forEach((entry, i, entries) => {
@@ -56,7 +56,7 @@ class PrefixWrapper {
5656
}
5757

5858
rename(oldPath, newPath) {
59-
return this._remote.rename(this._resolve(oldPath), this._resolve(newPath))
59+
return this._handler.rename(this._resolve(oldPath), this._resolve(newPath))
6060
}
6161

6262
_resolve(path) {
@@ -565,7 +565,7 @@ function createPrefixWrapperMethods() {
565565
if (arguments.length !== 0 && typeof (path = arguments[0]) === 'string') {
566566
arguments[0] = this._resolve(path)
567567
}
568-
return value.apply(this._remote, arguments)
568+
return value.apply(this._handler, arguments)
569569
}
570570

571571
defineProperty(pPw, name, descriptor)

0 commit comments

Comments
 (0)