diff options
| author | Tomas Bzatek <tbzatek@tbzatek.englab.brq.redhat.com> | 2008-09-15 14:37:17 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@tbzatek.englab.brq.redhat.com> | 2008-09-15 14:37:17 +0200 |
| commit | ca5f355ad058159edac0eb398d7aa43b57bbddad (patch) | |
| tree | 4e8fe495ae38045897d857541c0757ffc21bfbde /libarchive | |
| parent | 7da9e35bda21340ae65a8bd590ae675db9c62a44 (diff) | |
| download | tuxcmd-modules-release-0.6.50-dev.tar.xz | |
Add mandatory open() attribute fixing some compilation errorsv0.6.50release-0.6.50-dev
open(2): "mode must be specified when O_CREAT is in the flags, and is ignored otherwise."
Diffstat (limited to 'libarchive')
| -rw-r--r-- | libarchive/README | 4 | ||||
| -rw-r--r-- | libarchive/libarchive.c | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/libarchive/README b/libarchive/README index 6bb274d..f801d81 100644 --- a/libarchive/README +++ b/libarchive/README @@ -1,6 +1,6 @@ libarchive plugin for Tux Commander - Version: 0.0.6 - Release date: 2008-Aug-21 + Version: 0.0.7 + Release date: 2008-Sep-15 Copyright (C) 2008 Tomas Bzatek <tbzatek@users.sourceforge.net> http://tuxcmd.sourceforge.net diff --git a/libarchive/libarchive.c b/libarchive/libarchive.c index 462a030..ae7409e 100644 --- a/libarchive/libarchive.c +++ b/libarchive/libarchive.c @@ -1,5 +1,5 @@ /* libarchive plugin for Tux Commander - * version 0.0.6, designed for libarchive 2.5.5 + * version 0.0.7, designed for libarchive 2.5.5 * Copyright (C) 2008 Tomas Bzatek <tbzatek@users.sourceforge.net> * Check for updates on tuxcmd.sourceforge.net * @@ -47,8 +47,8 @@ -#define VERSION "0.0.6" -#define BUILD_DATE "2008-08-21" +#define VERSION "0.0.7" +#define BUILD_DATE "2008-09-15" #define DEFAULT_BLOCK_SIZE 65536 @@ -491,7 +491,8 @@ my_archive_read_data_into_fd(struct archive *a, struct archive_entry *entry, con printf("(II) my_archive_read_data_into_fd: extracting to '%s', Append = %d\n", sDstName, Append); if (Append) fd = open(sDstName, O_APPEND | O_WRONLY); - else fd = open(sDstName, O_CREAT | O_WRONLY); + else fd = open(sDstName, O_CREAT | O_WRONLY | O_TRUNC, + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); if (fd < 0) { fprintf(stderr, "(EE) my_archive_read_data_into_fd: error occured while extracting data: %s\n", strerror(errno)); return cVFS_Failed; |
