static void adjust_dirinfo();
#ifdef HAVE_LIBAPPLEFILE
-static boolean decode_macbinary(FILE *ofp, size_t size, const char *outPath);
+static boolean decode_macbinary(FILE *ofp, off_t size, const char *outPath);
#endif
/* ------------------------------------------------------------------------ */
}
/* ------------------------------------------------------------------------ */
+static int
+symlink_with_make_path(realname, name)
+ const char *realname;
+ const char *name;
+{
+ int l_code;
+
+ l_code = symlink(realname, name);
+ if (l_code < 0) {
+ make_parent_path(name);
+ l_code = symlink(realname, name);
+ }
+
+ return l_code;
+}
+
+/* ------------------------------------------------------------------------ */
static void
adjust_info(name, hdr)
char *name;
if (skip_flg == TRUE) { /* if skip_flg */
if (stat(name, &stbuf) == 0 && force != TRUE) {
- if (stbuf.st_mtime >= hdr->unix_last_modified_stamp) {
+ /* if (stbuf.st_mtime >= hdr->unix_last_modified_stamp) {*/
if (quiet != TRUE)
printf("%s : Skipped...\n", name);
return read_size;
- }
+ /* } */
}
}
if (noexec) {
if (up_flag == FALSE && force == FALSE) {
return read_size;
}
- } else {
+ }
+
+ if (skip_flg == TRUE) { /* if skip_flg */
if (GETSTAT(name, &stbuf) == 0 && force != TRUE) {
- if (stbuf.st_mtime >= hdr->unix_last_modified_stamp) {
+ /* if (stbuf.st_mtime >= hdr->unix_last_modified_stamp) { */
if (quiet != TRUE)
printf("%s : Skipped...\n", name);
return read_size;
- }
+ /* } */
}
}
unlink(name);
- make_parent_path(name);
- l_code = symlink(hdr->realname, name);
+ l_code = symlink_with_make_path(hdr->realname, name);
if (l_code < 0) {
if (quiet != TRUE)
warning("Can't make Symbolic Link \"%s\" -> \"%s\"",
af_file_t *afp = NULL;
FILE *ifp = NULL;
unsigned char *datap;
- off_t dlen;
+ size_t dlen;
if ((afp = af_open(temporary_name)) != NULL) {
/* fetch datafork */