If our frame content doesnt exist, treat it as frame not found

This commit is contained in:
Deon George 2024-12-09 16:12:49 +11:00
parent 41940a0a70
commit 46c60ca607

View File

@ -900,7 +900,7 @@ function Page(debug) {
var f = new File(filename);
if (! f.exists || ! f.open('rb',true)) {
log(LOG_ERROR,'|? File doesnt exist: ['+filename+']');
return false;
return undefined;
}
var content = f.read();
@ -958,7 +958,6 @@ function Page(debug) {
log(LOG_ERROR,'|? File doesnt exist: ['+filename+']');
return false;
}
var contents = JSON.parse(f.read());
contents.date = f.date;
f.close();
@ -967,6 +966,10 @@ function Page(debug) {
if (contents.version === 2)
contents.content = this.file_content(FRAMES_HOME+SESSION_EXT+'/'+this.name.toString()+'.'+CONTENT_EXT);
// The content file doesnt exist
if (contents.content === undefined)
return false;
var valid_sauce = false;
if (contents.content.substr(-128, 7) === 'SAUCE00') {