>
> GetPath() is supposed to have not put a trailing slash in that case.


But it should (the only case in which it should). `'/'`(root directory) is
not the same as an empty (invalid) path.

On Wed, May 27, 2015 at 4:11 PM, Zachary Turner <ztur...@google.com> wrote:

> GetPath() is supposed to have not put a trailing slash in that case. See
> the call to rtrim() in GetPath()
> On Wed, May 27, 2015 at 3:14 PM Chaoren Lin <chaor...@google.com> wrote:
>
>> ================
>> Comment at: source/Host/common/FileSpec.cpp:630
>> @@ +629,3 @@
>> +        std::string path = GetPath();
>> +        if (!m_filename && !path.empty())
>> +            path.push_back(GetPathSeparator());
>> ----------------
>> What if `path == "/"`?
>>
>> ================
>> Comment at: source/Host/common/FileSpec.cpp:844
>> @@ +843,3 @@
>> +    {
>> +        if (m_directory)
>> +            path.push_back('/');
>> ----------------
>> What if `m_directory == '/'`? We'd get `//filename`.
>>
>> http://reviews.llvm.org/D9942
>>
>> EMAIL PREFERENCES
>>   http://reviews.llvm.org/settings/panel/emailpreferences/
>>
>>
>>
_______________________________________________
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to