Jump to content

Recommended Posts

Posted (edited)

How to reproduce

Go to Start Menu, Run, type the wpi.exe path changing the case of some of the path letters and launch it: when adding files to commands WPI will insert invalid paths.

Cause

WPI doesn't do case-insensitive replacement of %wpipath% when browsing for commands to add, meaning that if WPI isn't started typing the exact lowercase/uppercase path name the path trimming function won't work.

Fix

Replace the following lines in configwizard.js

		if (str.indexOf(wpipath) != -1)
{
trimpath=wpipath;
trimpathvar="%wpipath%"; //Could have used %cdrom%
}

with

		if ((WPIPathPosition=str.toLowerCase().indexOf(wpipath.toLowerCase())) != -1)
{
trimpath=str.substring(WPIPathPosition,wpipath.length);
trimpathvar="%wpipath%"; //Could have used %cdrom%
}

Edited by Francesco

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

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