Skip to content

Conversation

@mwieder
Copy link
Contributor

@mwieder mwieder commented May 2, 2020

This patch uses specialFolderpath("home") as a replacement for "" when a path relative to the user's home directory is specified. Without this patch the base path is prepended to "" and the rest of the relative path, which creates the wrong directory structure.

@bwmilby
Copy link
Owner

bwmilby commented Jul 24, 2020

Something does not seem right here. Your code should never get executed. A path beginning with ~ or / should get interpreted as being absolute. Here's the function that is used:

private function _pathIsRelative pPath
   if pPath begins with "/" then return false
   if pPath begins with "~" then return false
   if char 2 of pPath is ":" then return false
   return true
end _pathIsRelative

@mwieder
Copy link
Contributor Author

mwieder commented Jul 24, 2020

Hmmm... I'll take a look at this again - it's been a few months now since this patch. Here's what I'm dealing with:
I have a plugin that I'm working on in my user plugins folder
I want the scripts repo elsewhere (with a symbolic link in the repo to the actual plugin)
From memory this patch allowed me to keep things separate rather than everything in a single folder, but I could well just be misremembering. Glancing at the code, I'd guess you're correct about the patch.
Stay tuned.

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