1j01/98

credits.txt don't work

Opened this issue · 1 comments

See http://www.cristianleandri.com/98-master/
Desktop errors and CREDITS.TXT, altertitle.txt folders my pictures and my documents don't work (failed to read), please help me to correct this.

I love 98!

Cristian.

1j01 commented

It's currently set up to load files from absolute paths (URLs), assuming that it's at the root of a domain (or subdomain), so it's making requests for files at e.g.
http://www.cristianleandri.com/desktop/CREDITS.txt
instead of
http://www.cristianleandri.com/98-master/desktop/CREDITS.txt
(found out this was the problem by looking at the Network tab in chrome devtools (knowing that it fetches files over HTTP - which isn't clear from the error message because it's going thru a filesystem abstraction library BrowserFS))

I made this decision to simply handling applications that aren't at the root (e.g. https://98.js.org/programs/sound-recorder/ which can be used standalone), which would have to load from different relative paths, but the same absolute paths (as long as the absolute paths work...)

I may be able to fix this fairly easily, but it's not necessarily a goal of the project to work with arbitrary hosting setups; it might need a custom server at some point in the future. For instance, it has a filesystem-index.json file that has to be regenerated, and it would be nice if that was generated dynamically by the server.

All that said, by the way, I do want to make it so you can definitely see the credits - since this is largely a showcase project, and you can still appreciate the projects themselves without the filesystem support. So I might want to make the credits work differently (it would be good to be able to click the links anyways),