- NULSTR_FOREACH_PAIR(j, k, symlinks)
- symlink_and_label(j, k);
+ NULSTR_FOREACH_PAIR(j, k, symlinks) {
+ if (j[0] == '-') {
+ j++;
+
+ if (access(j, F_OK))
+ continue;
+ }
+
+ if (prefix) {
+ char *linkname;
+
+ if (asprintf(&linkname, "%s/%s", prefix, k) < 0) {
+ log_oom();
+ break;
+ }
+
+ symlink_and_label(j, linkname);
+ free(linkname);
+ } else
+ symlink_and_label(j, k);
+ }