If the game is located in ProgramFiles and attempts to create a save file or folder, it'll throw an EPERM Operation Not Permitted error. It is fixed by right-clicking and running as administrator, but it'd be impractical to request all gamers to do that.
What's a way around this?
I'm thinking of simply saving everything in %APPDATA%, like XP and VX did, but how can this be done?
I guess this code would have to refer to %APPDATA% instead of the same folder as the game:
Thanks! 🙂
What's a way around this?
I'm thinking of simply saving everything in %APPDATA%, like XP and VX did, but how can this be done?
I guess this code would have to refer to %APPDATA% instead of the same folder as the game:
Code:
StorageManager.localFileDirectoryPath = function() {
var path = window.location.pathname.replace(/(\/www|)\/[^\/]*$/, '/save/');
if (path.match(/^\/([A-Z]\:)/)) {
path = path.slice(1);
}
return decodeURIComponent(path);
};
Thanks! 🙂