Git Product home page Git Product logo

Comments (8)

abbruzze avatar abbruzze commented on June 18, 2024

Hi @silverdr and happy to see you again.
Which version are you using ?
I tried with the latest one and have no issue.

I checked the line of code that generated the problem: it get the parent directory of the selected file; sometimes happens that, depending on the OS, this directory is not retrivied and JDK returns null.
Can you send me the path of the selected file ?

Please, can you try with the same file on a different directory ?

Bye

from kernal64.

silverdr avatar silverdr commented on June 18, 2024

Alessandro, I apologise for not mentioning the version, I obviously tried the latest released one:

https://github.com/abbruzze/kernal64/releases/tag/v1.7.3b4

Full path to the disk image file is:
/Users/silverdr/sources/silverdr/64er_sources/jema_n_silver/jema_n_silver.d64
and I start k64.sh with:
/Applications/local/emu/kernal64/k64.sh --warponload --beam-racer-enabled --drive8-file jema_n_silver.d64 --run-file jema_n_silver.c64
When I move up one level and start with:
/Applications/local/emu/kernal64/k64.sh --warponload --beam-racer-enabled --drive8-file jema_n_silver/jema_n_silver.d64 --run-file jema_n_silver.c64
The exception is in fact NOT thrown

from kernal64.

abbruzze avatar abbruzze commented on June 18, 2024

Ok, don't why but seems an OS's filesystem related issue.

Hey, if you have new BeamRacer demo, please, send me a preview!

from kernal64.

silverdr avatar silverdr commented on June 18, 2024

Hm, there are no fancy characters in the path, not even spaces… regular POSIX stuff works normally. Can't say what that could be. Right, I am trying to build a small demo. Shall remember to send you! ;-)

from kernal64.

silverdr avatar silverdr commented on June 18, 2024

FWIW - I don't think this is a filesystem issue. As I mentioned all regular POSIX stuff works on that filesystem, but a wild guess... I didn't check your sources on that but might it be that whatever method you use there does not utilise any POSIX functions for filesystem traversal but rather decomposes the path string? In such case that could explain the behaviour where there's more than one path component, then the parent is not null but if there's only one (the actual filename) then there's no parent there.. does this make any sense? ;-)

from kernal64.

silverdr avatar silverdr commented on June 18, 2024

I just confirmed - I am getting the same exception thrown on two different OS/filesystem combinations. Whether Macos and APFS or GNU/Linux and ext4fs the exception is there.

from kernal64.

abbruzze avatar abbruzze commented on June 18, 2024

I got it: the problem arises when you specify a file relative to the current directory (without any path).
Unfortunately, the Java API File.getParentFile returns null in this case.
A stupid workaround is to prefix it with ./
I will check this case and force the prefix on the filename.

from kernal64.

silverdr avatar silverdr commented on June 18, 2024

Actually I can do relative path spec. My guess is what I mentioned above - that the path string is decomposed to get whatever is before the filename. If you add "something" like ./ or ../parent_dir/ then it gets "something" and returns it instead of nil. Glad to be able to help :-)

from kernal64.

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.