Repository navigation
SET PATH TO with ADDITIVE adds the folders to the path - #2175
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The second line set the path to the text "(lcDataPath) ADDITIVE":
Now the folder is added to the path, with a semicolon like VFP does. A folder that is already there is not added again. VFP compares the full name, so the case or a last backslash don't matter. A list with commas or semicolons works too.
The help says that with ADDITIVE the path has to be a quoted string or an expression, and VFP 9 is strict about it:
SET PATH TO data ADDITIVEsets the path to "DATA ADDITIVE". That form stays as it was. For a macro the help tells to put the quotes inside the variable (xx = ["Folder2"]), that works now. A macro without the quotes didn't even compile here, so now it adds the folder too.Several folders separated with commas were stored fine but never searched, the search only split on the semicolon. I changed
__GetSearchPaths()in XSharp.Core for that, only for the FoxPro dialect, I didn't want to change it for VO. It's the only change outside XSharp.VFP.Not done:
SET("PATH")is upper case in VFP and we keep the path as written. AndSET PATH TO "c:\a" + cOtherwithout ADDITIVE is still wrong, that's the old rule in set.xh.Ten tests added, with the values measured in VFP 9.
Fixes #2068