Re: [PATCH bw/realpath-wo-chdir] real_path: canonicalize directory separators in root parts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 22.12.2016 um 18:33 schrieb Brandon Williams:
It took me a couple extra seconds to realize that
offset_1st_component returns 0 with a relative path, which makes causes
the call to get_root_part to essentially be a noop (ie nothing is
resolved).

Yeah, I am still unsure whether it is a good idea to optimize away the is_absolute_path() call, because we lose the symmetry to the symlink case, where we cannot get rid of the call...

But I think the condition plus comment

   if (!resolved->len) {
       /* relative path; can use CWD as the initial resolved path */

makes things fairly clear.

-- Hannes




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]