Subversion Repositories SvarDOS

Rev

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

Rev 1880 Rev 1891
Line 325... Line 325...
325
  sprintf(buff, "%s\\appinfo\\%s.lsm", dosdir, pkgname);
325
  sprintf(buff, "%s\\appinfo\\%s.lsm", dosdir, pkgname);
326
  mkpath(buff);
326
  mkpath(buff);
327
 
327
 
328
  /* start by extracting the APPINFO (LSM) file - I need it so I can append the
328
  /* start by extracting the APPINFO (LSM) file - I need it so I can append the
329
   * list of files belonging to the packages later */
329
   * list of files belonging to the packages later */
-
 
330
  printf(" %s -> %s\n", ziplinkedlist->filename, buff);
330
  unzip_result = zip_unzip(zipfd, ziplinkedlist, buff);
331
  unzip_result = zip_unzip(zipfd, ziplinkedlist, buff);
331
  if (unzip_result != 0) {
332
  if (unzip_result != 0) {
332
    kitten_printf(8, 3, ziplinkedlist, buff); /* "ERROR: failed extracting '%s' to '%s'!" */
333
    kitten_printf(10, 4, unzip_result); /* "ERROR: unzip failure (%d)" */
333
    printf(" [%d]\n", unzip_result);
334
    puts("");
334
    return(-1);
335
    return(-1);
335
  }
336
  }
336
  printf(" %s -> %s\n", ziplinkedlist->filename, buff);
-
 
337
  filesextractedsuccess++;
337
  filesextractedsuccess++;
338
 
338
 
339
  /* open the (freshly created) LSM file */
339
  /* open the (freshly created) LSM file */
340
  lsmfd = fopen(buff, "ab"); /* opening in APPEND mode so I do not loose the LSM content */
340
  lsmfd = fopen(buff, "ab"); /* opening in APPEND mode so I do not loose the LSM content */
341
  if (lsmfd == NULL) {
341
  if (lsmfd == NULL) {
Line 357... Line 357...
357
    /* create the path, just in case it doesn't exist yet */
357
    /* create the path, just in case it doesn't exist yet */
358
    mkpath(buff);
358
    mkpath(buff);
359
    sprintf(fulldestfilename, "%s%s", buff, shortfile);
359
    sprintf(fulldestfilename, "%s%s", buff, shortfile);
360
 
360
 
361
    /* Now unzip the file */
361
    /* Now unzip the file */
-
 
362
    printf(" %s -> %s", curzipnode->filename, buff);
362
    unzip_result = zip_unzip(zipfd, curzipnode, fulldestfilename);
363
    unzip_result = zip_unzip(zipfd, curzipnode, fulldestfilename);
-
 
364
    puts("");
363
    if (unzip_result != 0) {
365
    if (unzip_result != 0) {
364
      kitten_printf(8, 3, curzipnode->filename, fulldestfilename); /* "ERROR: failed extracting '%s' to '%s'!" */
366
      kitten_printf(10, 4, unzip_result); /* "ERROR: unzip failure (%d)" */
365
      printf(" [%d]\n", unzip_result);
367
      puts("");
366
      filesextractedfailure += 1;
368
      filesextractedfailure += 1;
367
    } else {
369
    } else {
368
      printf(" %s -> %s\n", curzipnode->filename, buff);
-
 
369
      filesextractedsuccess += 1;
370
      filesextractedsuccess += 1;
370
    }
371
    }
371
  }
372
  }
372
  fclose(lsmfd);
373
  fclose(lsmfd);
373
 
374