Subversion Repositories SvarDOS

Rev

Rev 225 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 225 Rev 227
Line 10... Line 10...
10
#include <string.h>    /* strcpy() */
10
#include <string.h>    /* strcpy() */
11
#include <unistd.h>    /* read() */
11
#include <unistd.h>    /* read() */
12
#include <sys/types.h> /* struct utimbuf */
12
#include <sys/types.h> /* struct utimbuf */
13
 
13
 
14
#include "crc32.h"     /* all CRC32 related stuff */
14
#include "crc32.h"     /* all CRC32 related stuff */
15
#include "fdnpkg.h"    /* PKGINST_NOSOURCE, PKGINST_SKIPLINKS... */
15
#include "fdnpkg.h"    /* PKGINST_SKIPLINKS... */
16
#include "helpers.h"   /* slash2backslash(), strtolower() */
16
#include "helpers.h"   /* slash2backslash(), strtolower() */
17
#include "fileexst.h"
17
#include "fileexst.h"
18
#include "kprintf.h"
18
#include "kprintf.h"
19
#include "libunzip.h"  /* zip_listfiles()... */
19
#include "libunzip.h"  /* zip_listfiles()... */
20
#include "showinst.h"  /* pkg_loadflist() */
20
#include "showinst.h"  /* pkg_loadflist() */
Line 227... Line 227...
227
    strtolower(curzipnode->filename);
227
    strtolower(curzipnode->filename);
228
    /* remove 'directory' ZIP entries to avoid false alerts about directory already existing */
228
    /* remove 'directory' ZIP entries to avoid false alerts about directory already existing */
229
    if ((curzipnode->flags & ZIP_FLAG_ISADIR) != 0) {
229
    if ((curzipnode->flags & ZIP_FLAG_ISADIR) != 0) {
230
      curzipnode->filename[0] = 0; /* mark it "empty", will be removed in a short moment */
230
      curzipnode->filename[0] = 0; /* mark it "empty", will be removed in a short moment */
231
    }
231
    }
232
    /* if --nosource specified, skip sources */
-
 
233
    if ((flags & PKGINST_NOSOURCE) != 0) {
-
 
234
      if (fdnpkg_strcasestr(curzipnode->filename, "source\\") == curzipnode->filename) { /* drop this file */
-
 
235
        curzipnode->filename[0] = 0; /* in fact, we just mark the file as 'empty' on the filename.. see below */
-
 
236
      }
-
 
237
    }
-
 
238
    /* is it a "link file"? */
232
    /* is it a "link file"? */
239
    if (fdnpkg_strcasestr(curzipnode->filename, "links\\") == curzipnode->filename) {
233
    if (fdnpkg_strcasestr(curzipnode->filename, "links\\") == curzipnode->filename) {
240
      /* skip links, if that's what the user wants */
234
      /* skip links, if that's what the user wants */
241
      if ((flags & PKGINST_SKIPLINKS) != 0) {
235
      if ((flags & PKGINST_SKIPLINKS) != 0) {
242
        curzipnode->filename[0] = 0; /* in fact, we just mark the file as 'empty' on the filename.. see later below */
236
        curzipnode->filename[0] = 0; /* in fact, we just mark the file as 'empty' on the filename.. see later below */