~ubuntu-branches/ubuntu/dapper/file-roller/dapper-updates

« back to all changes in this revision

Viewing changes to src/fr-command-zip.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2005-12-13 00:19:53 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051213001953-0klipgnhk6vikhrt
Tags: 2.13.2-0ubuntu1
* New upstream version:
  - Fixed bug #323713: "Save as" should default to current archive filename
    (Ubuntu: #20132)
  - Fixed bug #315069: file-roller: drag 'n drop doesn't work for more
    than 1 file.
  - Fixed bug #323534: Passwords improperly escaped for zip files
  - Do not open a progress dialog when dragging files, use a progressbar
    in the statusbar instead.
  - Fixed bug #316364: Nautilus dependency should be optional
  - Fixed bug #311821: ascending and descending indicators are opposite
    from expected.
  - Fixed bug #317423: Conflicting mnemonic in "Extract" dialog.
  - Fixed bug #323068: file-roller fails in chosing extract-to directory
  - Fixed bug #322197: Improve Naming Filename when create new Archive file
  - Fixed bug #316564: needs unzip AND zip
    (Ubuntu: #15595)
  - Simplified the add dialog populating the file type combobox with the
    extensions instead of the descriptions.
  - Set progress dialog display delay to 1 second.
  - More HIG compliant progress dialog.
  - Use a single command execution to add many files and folders to an
    archive to speed up the operation.
  - Allow to stop creation of a new archive.
  - Correctly associate fr to 7zip files.
* debian/patches/03_lp-autoconf.patch:
  - updated

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
#include "file-data.h"
33
33
#include "file-utils.h"
 
34
#include "glib-utils.h"
34
35
#include "fr-command.h"
35
36
#include "fr-command-zip.h"
36
37
 
155
156
        fdata = file_data_new ();
156
157
 
157
158
        fields = split_line (line, 7);
158
 
        fdata->size = atoll (fields[0]);
 
159
        fdata->size = g_ascii_strtoull (fields[0], NULL, 10);
159
160
        fdata->modified = mktime_from_string (fields[4], fields[5]);
160
161
        g_strfreev (fields);
161
162
 
204
205
 
205
206
                fr_process_add_arg (comm->process, "-P");
206
207
 
207
 
                e_password = escape_str (password, "\"");
 
208
                e_password = escape_str (password, "\"*?[]'`()$!;");
208
209
                if (e_password != NULL) {
209
210
                        arg = g_strconcat ("\"", e_password, "\"", NULL);
210
211
                        g_free (e_password);
248
249
        fr_command_message (comm, line);
249
250
 
250
251
        if (comm->n_files != 0) {
251
 
                double fraction = (double) comm->n_file++ / comm->n_files;
 
252
                double fraction = (double) comm->n_file++ / (comm->n_files+1);
252
253
                fr_command_progress (comm, fraction);
253
254
        }
254
 
 
255
255
}
256
256
 
257
257
 
426
426
static void 
427
427
fr_command_zip_init (FRCommand *comm)
428
428
{
 
429
        comm->file_type = FR_FILE_TYPE_ZIP;
 
430
 
429
431
        comm->propAddCanUpdate             = TRUE; 
430
432
        comm->propAddCanReplace            = TRUE; 
431
433
        comm->propExtractCanAvoidOverwrite = TRUE;
484
486
{
485
487
        FRCommand *comm;
486
488
 
487
 
        if ((!is_program_in_path("zip")) ||
488
 
            (!is_program_in_path("unzip"))) {
 
489
        if (!is_program_in_path ("zip") &&
 
490
            !is_program_in_path ("unzip")) {
489
491
                return NULL;
490
492
        }
491
493