fix filename updating for smartfile
This commit is contained in:
parent
495c3afdc3
commit
7909bd1a38
4
dist/smartfile.classes.smartfile.js
vendored
4
dist/smartfile.classes.smartfile.js
vendored
@ -107,8 +107,8 @@ class Smartfile {
|
|||||||
// update things
|
// update things
|
||||||
updateFileName(fileNameArg) {
|
updateFileName(fileNameArg) {
|
||||||
let oldFileName = this.parsedPath.base;
|
let oldFileName = this.parsedPath.base;
|
||||||
this.path.replace(new RegExp(oldFileName + '$'), fileNameArg);
|
this.path = this.path.replace(new RegExp(oldFileName + '$'), fileNameArg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.Smartfile = Smartfile;
|
exports.Smartfile = Smartfile;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRmaWxlLmNsYXNzZXMuc21hcnRmaWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRmaWxlLmNsYXNzZXMuc21hcnRmaWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSwrQ0FBOEM7QUFTOUM7OztHQUdHO0FBQ0g7SUEyQkU7OztPQUdHO0lBR0gsWUFBYSxVQUF3QztRQUNuRCxFQUFFLENBQUMsQ0FBQyxVQUFVLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQztZQUM3QixJQUFJLENBQUMsYUFBYSxHQUFHLFVBQVUsQ0FBQyxhQUFhLENBQUE7UUFDL0MsQ0FBQztRQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQyxVQUFVLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQztZQUNwQyxJQUFJLENBQUMscUJBQXFCLENBQUMsVUFBVSxDQUFDLGFBQWEsQ0FBQyxDQUFBO1FBQ3RELENBQUM7UUFBQyxJQUFJLENBQUMsQ0FBQztZQUNOLE9BQU8sQ0FBQyxHQUFHLENBQUMsMEJBQTBCLENBQU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I7UUFDakMsSUFBSSxXQUFXLEdBQUcsSUFBSSxDQUFDLFVBQVUsQ0FBQyxJQUFJLENBQUE7UUFDdEMsSUFBSSxDQUFDLElBQUksR0FBRyxJQUFJLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLE1BQU0sQ0FBQyxXQUFXLEdBQUcsR0FBRyxDQUFDLEVBQUMsV0FBVyxDQUFDLENBQUE7SUFDMUUsQ0FBQztDQUNGO0FBcElELDhCQW9JQyJ9
|
@ -141,6 +141,6 @@ export class Smartfile {
|
|||||||
// update things
|
// update things
|
||||||
updateFileName (fileNameArg: string) {
|
updateFileName (fileNameArg: string) {
|
||||||
let oldFileName = this.parsedPath.base
|
let oldFileName = this.parsedPath.base
|
||||||
this.path.replace(new RegExp(oldFileName + '$'),fileNameArg)
|
this.path = this.path.replace(new RegExp(oldFileName + '$'),fileNameArg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user