Comments (7)
You are right, the previous fix only looked at knloader.bas
and not to knlauncher
The attached file should fix it on knlauncher
side.
However, i don't have time today. I will try to test it tomorrow, if i can find some time.
Both changes are also committed on the develop branch, here:
https://github.com/kounch/knloader/commits/develop
from knloader.
You are right. The "." at the end of the path is breaking it.
Latest commit should fix it. At least in my testing environment is working fine.
Could you try to download the attached zip file (with knlauncher
and knloader.bas
inside) and see if they fix it also for you?
Thanks for your help!
from knloader.
Great!
Released 0.12 Beta including this fix.
from knloader.
It looks like a parsing problem no the loader side, rather than the BDT creator.
This version of the loader tries to sanitise better the directory path creation and may fix it.
from knloader.
I've had a look at this and there seem to be two related issues when the BDT file and cache are pointed at the root folder.
The first is that KNLOADER.BAS can't actually confirm the existence of files in the root of the drive, and so gives a Not Found error. I'm guessing this a path construction error of some kind but I didn't dig too deeply.
The second problem is that the temporary path information file/array generated by KNLOADER.BAS stores it like this...
/<PATH>
<SUBFOLDER>
<FILENAME>
...and KNLAUNCHER adds / characters between the three elements when in reads it back. This is fine for non-root structures where this...
/PATH
SUBFOLER
FILENAME.EXT
...becomes this...
/PATH/SUBFOLDER/FILENAME.EXT
But for root-based structures...
/
SUBFOLDER
FILENAME.EXT
...becomes...
//SUBFOLDER/FILENAME.EXT
...which is an invalid path because of the extra /
I'm not sure there's a single fix for both of these. The second one seems easier in principle (if the root is / on its own, treat it as null and let KNLAUNCHER put it back) but in practice I couldn't get it to work. Your self-erasing code, and me forgetting to save my own edits, defeated me one too many times. I need more practice with the Next and its quirks!
Looking at the way the various programs pass data to each other, it may be easier to trap these errors in KNLAUNCHER rather than KNLOADER.BAS.
from knloader.
Thanks. That fix worked for files in subfolders and sub-subfolders of root, but not those in the root itself.
The two lines below if added to KNLOADER.BAS will fix the root files problem, but there may be more efficient ways of achieving this in KNLAUNCHER or the BDT/cache builders. It's getting a bit late for experiments but as far as I can tell there's still something funny going on with the building of paths to the "home" directory, which are null when "home" is a folder but are '.' when "home" is root. I think this may be what the second line here is working around.
Anyway, hopefully these will give a clue as to a more permanent solution:
975 IF c$="/." THEN c$="/" :; Prevent file checker from failing with a Not Found when checking root
1015 IF a$="." THEN a$="" :; Prevent invalid path giving ERROR 45 in KNLAUNCHER
from knloader.
Yes, that seems to have solved it for both root-based and folder-based start folders. I started over with a fresh install of Beta 11 and then added the two new files over the top, just in case I ended up with another broken hybrid.
(I did spend about ten minutes wondering why it wasn't picking up two programs in a subfolder of my DEMOS folder, before realising they're both .TRD files and so can't be loaded natively anyway! The worst bugs to find are the ones that only exist in your own head.)
Thanks again for persevering with this. The likelihood of me using root-based structures with this program "in the wild" is very low, but it's nice to know it'll work if I do.
from knloader.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knloader.