Skip to content

SET PATH TO with ADDITIVE adds the folders to the path - #2175

Merged
RobertvanderHulst merged 1 commit into
devfrom
fix/vfp-set-path-additive
Nov 15, 2026
Merged

RobertvanderHulst merged 1 commit into
devfrom
fix/vfp-set-path-additive

Conversation

@Irwin1985

Copy link
Copy Markdown
Contributor

The second line set the path to the text "(lcDataPath) ADDITIVE":

SET PATH TO (lcRootPath)
SET PATH TO (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 ADDITIVE sets 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. And SET PATH TO "c:\a" + cOther without ADDITIVE is still wrong, that's the old rule in set.xh.

Ten tests added, with the values measured in VFP 9.

Fixes #2068

@RobertvanderHulst
RobertvanderHulst merged commit 3362b1e into dev Nov 15, 2026
1 check passed
@RobertvanderHulst
RobertvanderHulst deleted the fix/vfp-set-path-additive branch November 15, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants