Jump to content

Bug in determining %ROOT%?


Recommended Posts

In core.js defaultWPI() you get the ROOT with

	// %root%
root=fso.GetParentFolderName(wpipath);
if (root.indexOf(":")==1)
root=root.substr(0,2);

But ROOT should be used to get the WPI-parentfolder.

My folder-structure looks like this

Drive:\any\directory
- WPI (only with contents from the download-package)
- Tools (my additional Tools)
- Applications
- Common
- Multimedia
- Microsoft
- ...

And my commands look like this:

%ROOT%\Applications\Multimedia\...

But with the Bug above my commands does not work. :-(

Only with

root=fso.GetParentFolderName(wpipath);

all works fine.

Al

Edited by AlBundy33
Link to comment
Share on other sites


You are correct. The person that originally brought it to my attention (number of backslashes needed), and myself, have WPI only 1 folder deep, so the code for us is correct. Change it to this:

	// %root%
root=fso.GetParentFolderName(wpipath);
if (root.substr(root.length-1,1)=="\\")
root=root.substr(0,root.length-1);

Will be updated in dowload package, as well.

Link to comment
Share on other sites

The more I thought about, the more I remembered why I did it the original way.

To me, root means the very beginning, as in C: or D:, no matter how deeply buried WPI is.

Parent would mean one folder up from the starting place.

Lawrenca came up with the original code, and like me, we are just one folder deep, so it worked for us. That is just how we envisioned a "standard" dvd to be laid out:

D:

---I386

---Install

------Tools

------Utilities

------etc.

---WPI

------Install (could be here also)

Not like this:

D:

---I386

------Software

---------WPI

---------Apps

---------Utilitiies

But, too each his own. Nothing is written in stone.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...