Git Product home page Git Product logo

Comments (1)

MineRobber9000 avatar MineRobber9000 commented on May 26, 2024

The issue seems to be in the handling of the website. Specifically, the website only gets considered as a loadable target if we're inside the website's folder (if tic_fs_ispubdir returns true, which only happens if our working directory is in the website). Otherwise, it tries to load from the local filesystem, which naturally fails.

Even if we're inside the website directory and attempt to load a file from a directory, it still doesn't work, this time because tic_fs_enum only considers the working directory when trying to determine where a file exists (attempting to load, say, Play/Games/zracer.tic from the base tic80.com directory would only work if there was a file in the root path that had a filename of Play/Games/zracer.tic, which I was able to confirm via testing locally with my custom surf server).

The former issue could be solved by adding a check if we're in the root directory and loading a path which starts with TIC_HOST, and the latter issue could be solved using dirname and basename (or equivalents) to split the path into directory (which is appended to the working directory) and filename to search for.

from tic-80.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.