When create a hard link of a file, the path and the file name are
same if it at the root directory, so the length of the path and name
will be the same in this case.
Signed-off-by: Wu Libin <lwu@ddn.com>
Change-Id: I3a72491efdc041ad0e96d036b04600b76bb646fe
Reviewed-on: http://review.whamcloud.com/13546
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
break;
len = strlen(info->path) - strlen(info->name);
- if (len > 0 && strcmp(info->path + len,
+ if (len >= 0 && strcmp(info->path + len,
info->name) == 0)
snprintf(info->dest, PATH_MAX, "%s/%s",
status->ls_targets[info->target_no],