Skip to content

Commit

Permalink
Fix issue of unix and member name clash
Browse files Browse the repository at this point in the history
Signed-off-by: Liam Allan <mrliamallan@live.co.uk>
  • Loading branch information
worksofliam committed Jun 30, 2023
1 parent 7dfe7f7 commit a11c031
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions extension/server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ parser.setIncludeFileFetch(async (stringUri: string, includeString: string) => {
// This is likely bad since you can include across file systems.

const hasQuotes = (includeString.startsWith(`'`) && includeString.endsWith(`'`)) || (includeString.startsWith(`"`) && includeString.endsWith(`"`))
const isUnixPath = hasQuotes || includeString.includes(`/`);
const isUnixPath = hasQuotes || (includeString.includes(`/`) && !includeString.includes(`,`));

cleanString = includeString;

Expand Down Expand Up @@ -195,9 +195,13 @@ parser.setIncludeFileFetch(async (stringUri: string, includeString: string) => {
}).toString();

} else {
// Path from home directory?
// TODO: Instead of searching for `.*`, search for:
// - `${cleanString}`
// - `${cleanString}.rpgleinc`
// - `${cleanString}.rpgle`
if (path.extname(cleanString) === ``) cleanString += `.*`;

// Path from home directory?
const foundStreamfile = await streamfileResolve(stringUri, cleanString);

if (foundStreamfile) {
Expand Down

0 comments on commit a11c031

Please sign in to comment.