• R/O
  • HTTP
  • SSH
  • HTTPS

lha: Commit


Commit MetaInfo

Revision3390fc522cb5340a9879a49a830b75be84eb721b (tree)
Time2016-10-05 23:35:24
AuthorKoji Arai <jca02266@gmai...>
CommiterKoji Arai

Log Message

Merge branch 'master' of github.com:jca02266/lha

Change Summary

Incremental Difference

--- a/src/lhext.c
+++ b/src/lhext.c
@@ -198,6 +198,23 @@ open_with_make_path(name)
198198 }
199199
200200 /* ------------------------------------------------------------------------ */
201+static int
202+symlink_with_make_path(realname, name)
203+ const char *realname;
204+ const char *name;
205+{
206+ int l_code;
207+
208+ l_code = symlink(realname, name);
209+ if (l_code < 0) {
210+ make_parent_path(name);
211+ l_code = symlink(realname, name);
212+ }
213+
214+ return l_code;
215+}
216+
217+/* ------------------------------------------------------------------------ */
201218 static void
202219 adjust_info(name, hdr)
203220 char *name;
@@ -509,8 +526,7 @@ extract_one(afp, hdr)
509526 }
510527
511528 unlink(name);
512- make_parent_path(name);
513- l_code = symlink(hdr->realname, name);
529+ l_code = symlink_with_make_path(hdr->realname, name);
514530 if (l_code < 0) {
515531 if (quiet != TRUE)
516532 warning("Can't make Symbolic Link \"%s\" -> \"%s\"",
Show on old repository browser