[PATCH] Add option to operate on symbolic links for sys::fs::remove() and sys::fs::status()
Argyrios Kyrtzidis
kyrtzidis at apple.com
Tue Mar 18 16:41:01 PDT 2014
This simplifies things a bit, please see the attached updated patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file_link2.diff
Type: application/octet-stream
Size: 5224 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140318/98a03013/attachment.obj>
-------------- next part --------------
On Mar 18, 2014, at 4:02 PM, Rafael EspĂndola <rafael.espindola at gmail.com> wrote:
> For remove, I think we can always use lstat and change
>
> if (!S_ISREG(buf.st_mode) && !S_ISDIR(buf.st_mode))
>
> to
>
> if (!S_ISREG(buf.st_mode) && !S_ISDIR(buf.st_mode) && !S_ISLNK(buf.st_mode))
>
> no?
>
>
> On 17 March 2014 19:10, Argyrios Kyrtzidis <kyrtzidis at apple.com> wrote:
>> Hi Rafael,
>>
>> The attached patch introduces a boolean option to sys::fs::remove() and sys::fs::status() to allow them to operate on a symbolic link directly (if the provided path is one).
>> This is then used by LockFileManager as the patch demonstrates.
>>
>> Please review!
>>
>> -Argyrios
More information about the llvm-commits
mailing list