On Friday, February 6, 2015 at 8:25:09 AM UTC-8, Jameson wrote:
>
> Calling joinpath on various path segments before creating a final path 
> should be valid (to preserve associativity), which means that embedded 
> separators is a quite valid operation. 
> On Fri, Feb 6, 2015 at 11:16 AM Seth <[email protected] <javascript:>> 
> wrote:
>
>> The thing about joinpath is that it's typically used for cross-platform 
>> compatibility. That is, there should be NO slashes that can be interpreted 
>> as directory separators in any component*, since some systems use a forward 
>> slash, some a backward slash, and some use other characters like colons to 
>> separate directories, Since you're (presumably) using joinpath to ensure 
>> that your code works regardless of the system-specific directory delimiter, 
>> you don't want to put any delimiters in there to begin with.
>>
>> Calling joinpath with anything other than valid FILENAME characters ought 
>> to raise a warning or an exception.
>>
>> * This is problematic when you need to get a path relative to some root, 
>> but we'll leave that as an edge case for now - it can be worked around via 
>> environment variables.
>>
>

Yup, you're absolutely right - this was a use case I hadn't considered.

Reply via email to