From 99722e3bd1f80aac6880fd3ea325b3a1885723b6 Mon Sep 17 00:00:00 2001 From: devlinjd Date: Fri, 6 Nov 2015 14:56:33 -0500 Subject: [PATCH] Add filename metadata on save. --- src/core/sheet.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/sheet.js b/src/core/sheet.js index 80d0f0a..9d8e666 100644 --- a/src/core/sheet.js +++ b/src/core/sheet.js @@ -39,8 +39,8 @@ Abstract character/resume sheet representation. Save the sheet to disk (for environments that have disk access). */ Sheet.prototype.save = function( filename ) { - filename = filename || this.meta.fileName; - FS.writeFileSync( filename, this.stringify(), 'utf8' ); + this.meta.fileName = filename || this.meta.fileName; + FS.writeFileSync( this.meta.fileName, this.stringify(), 'utf8' ); return this; };