Subversion Repositories SvarDOS

Rev

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

Rev 1965 Rev 1966
Line 147... Line 147...
147
    strlwr(curzipnode->filename);
147
    strlwr(curzipnode->filename);
148
 
148
 
149
    /* validate that the file has a valid filename (8+3, no shady chars...) */
149
    /* validate that the file has a valid filename (8+3, no shady chars...) */
150
    if (validfilename(curzipnode->filename) != 0) {
150
    if (validfilename(curzipnode->filename) != 0) {
151
      outputnl(svarlang_str(3, 23)); /* "ERROR: Package contains an invalid filename:" */
151
      outputnl(svarlang_str(3, 23)); /* "ERROR: Package contains an invalid filename:" */
152
      printf(" %s\n", curzipnode->filename);
152
      outputnl(curzipnode->filename);
153
      goto RAII_ERR;
153
      goto RAII_ERR;
154
    }
154
    }
155
 
155
 
156
    /* remove 'directory' ZIP entries to avoid false alerts about directory already existing */
156
    /* remove 'directory' ZIP entries to avoid false alerts about directory already existing */
157
    if ((curzipnode->flags & ZIP_FLAG_ISADIR) != 0) goto DELETE_ZIP_NODE;
157
    if ((curzipnode->flags & ZIP_FLAG_ISADIR) != 0) goto DELETE_ZIP_NODE;
Line 248... Line 248...
248
     * updating the package and the local file belongs to it */
248
     * updating the package and the local file belongs to it */
249
    shortfile = computelocalpath(curzipnode->filename, fname, dosdir, dirlist, bootdrive);
249
    shortfile = computelocalpath(curzipnode->filename, fname, dosdir, dirlist, bootdrive);
250
    strcat(fname, shortfile);
250
    strcat(fname, shortfile);
251
    if ((findfileinlist(flist, fname) == NULL) && (fileexists(fname) != 0)) {
251
    if ((findfileinlist(flist, fname) == NULL) && (fileexists(fname) != 0)) {
252
      outputnl(svarlang_str(3, 9)); /* "ERROR: Package contains a file that already exists locally:" */
252
      outputnl(svarlang_str(3, 9)); /* "ERROR: Package contains a file that already exists locally:" */
253
      printf(" %s\n", fname);
253
      outputnl(fname);
254
      goto RAII_ERR;
254
      goto RAII_ERR;
255
    }
255
    }
256
  }
256
  }
257
 
257
 
258
  goto RAII;
258
  goto RAII;