...
 
Commits (18)
version 3.10.2.1
----------------
Bugs fixed:
* rar: fixed error with some password protected files (#711745)
version 3.10.2
--------------
Bugs fixed:
* Application name appears untranslated. (#710982)
* Fixed crash when clicking the open button after creation. (#710576)
New or updated application translations:
* Dutch (Erwin Poeze)
* Русский (Stas Solovey)
version 3.10.1
--------------
......
......@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
AC_INIT([file-roller],[3.10.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=file-roller],[file-roller])
AC_INIT([file-roller],[3.10.2.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=file-roller],[file-roller])
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz tar-ustar])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
......
......@@ -203,8 +203,11 @@ egg_desktop_file_new_from_key_file (GKeyFile *key_file,
else
desktop_file->source = g_strdup (source);
desktop_file->name = g_key_file_get_string (key_file, EGG_DESKTOP_FILE_GROUP,
EGG_DESKTOP_FILE_KEY_NAME, error);
desktop_file->name = g_key_file_get_locale_string (key_file,
EGG_DESKTOP_FILE_GROUP,
EGG_DESKTOP_FILE_KEY_NAME,
NULL,
error);
if (!desktop_file->name)
{
egg_desktop_file_free (desktop_file);
......
......@@ -193,6 +193,11 @@ egg_sm_client_xsmp_class_init (EggSMClientXSMPClass *klass)
EggSMClient *
egg_sm_client_xsmp_new (void)
{
#if GTK_CHECK_VERSION(3,0,0)
if (!GDK_IS_X11_DISPLAY_MANAGER (gdk_display_manager_get ()))
return NULL;
#endif
if (!g_getenv ("SESSION_MANAGER"))
return NULL;
......@@ -368,7 +373,7 @@ sm_client_xsmp_startup (EggSMClient *client,
free (ret_client_id);
gdk_threads_enter ();
#if !GTK_CHECK_VERSION(2,91,7) && !GTK_CHECK_VERSION(3,0,0)
#if !GTK_CHECK_VERSION(2,23,3) && !GTK_CHECK_VERSION(3,0,0)
gdk_set_sm_client_id (xsmp->client_id);
#else
gdk_x11_set_sm_client_id (xsmp->client_id);
......
......@@ -36,6 +36,7 @@ fr
fur
fy
ga
gd
gl
gu
he
......
This diff is collapsed.
This diff is collapsed.
......@@ -99,7 +99,7 @@ msgstr "Archieven maken en wijzigen"
#: ../data/file-roller.desktop.in.in.h:3
msgid "zip;tar;extract;unpack;"
msgstr "zip;tar;extract;unpack;archiveren;uitpakken;comprimeren"
msgstr "zip;tar;extract;unpack;archiveren;uitpakken;comprimeren;"
#: ../data/org.gnome.FileRoller.gschema.xml.in.h:1
msgid "How to sort files"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -500,53 +500,20 @@ _g_file_set_attributes_from_info (GFile *file,
}
static gboolean
_g_file_set_attributes_from_entry (GFile *file,
struct archive_entry *entry,
ExtractData *extract_data,
GCancellable *cancellable,
GError **error)
{
GFileInfo *info;
gboolean result;
info = _g_file_info_create_from_entry (entry, extract_data);
result = _g_file_set_attributes_from_info (file, info, cancellable, error);
g_object_unref (info);
return result;
}
static gboolean
restore_modification_time (GHashTable *created_folders,
GCancellable *cancellable,
GError **error)
static void
restore_original_file_attributes (GHashTable *created_files,
GCancellable *cancellable)
{
GHashTableIter iter;
gpointer key, value;
gboolean result = TRUE;
g_hash_table_iter_init (&iter, created_folders);
while (result && g_hash_table_iter_next (&iter, &key, &value)) {
g_hash_table_iter_init (&iter, created_files);
while (g_hash_table_iter_next (&iter, &key, &value)) {
GFile *file = key;
GFileInfo *original_info = value;
GFileInfo *info;
GFileInfo *info = value;
if (g_file_info_get_attribute_status (original_info, G_FILE_ATTRIBUTE_TIME_MODIFIED) != G_FILE_ATTRIBUTE_STATUS_SET)
continue;
info = g_file_info_new ();
g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED, g_file_info_get_attribute_uint64 (original_info, G_FILE_ATTRIBUTE_TIME_MODIFIED));
if (g_file_info_get_attribute_status (original_info, G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC) == G_FILE_ATTRIBUTE_STATUS_SET)
g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC, g_file_info_get_attribute_uint32 (original_info, G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC));
result = _g_file_set_attributes_from_info (file, info, cancellable, error);
g_object_unref (info);
_g_file_set_attributes_from_info (file, info, cancellable, NULL);
}
return result;
}
......@@ -558,7 +525,7 @@ extract_archive_thread (GSimpleAsyncResult *result,
ExtractData *extract_data;
LoadData *load_data;
GHashTable *checked_folders;
GHashTable *created_folders;
GHashTable *created_files;
GHashTable *folders_created_during_extraction;
struct archive *a;
struct archive_entry *entry;
......@@ -568,7 +535,7 @@ extract_archive_thread (GSimpleAsyncResult *result,
load_data = LOAD_DATA (extract_data);
checked_folders = g_hash_table_new_full (g_file_hash, (GEqualFunc) g_file_equal, g_object_unref, NULL);
created_folders = g_hash_table_new_full (g_file_hash, (GEqualFunc) g_file_equal, g_object_unref, g_object_unref);
created_files = g_hash_table_new_full (g_file_hash, (GEqualFunc) g_file_equal, g_object_unref, g_object_unref);
folders_created_during_extraction = g_hash_table_new_full (g_file_hash, (GEqualFunc) g_file_equal, g_object_unref, NULL);
fr_archive_progress_set_total_files (load_data->archive, extract_data->n_files_to_extract);
......@@ -655,7 +622,7 @@ extract_archive_thread (GSimpleAsyncResult *result,
g_object_unref (info);
break;
}
g_error_free (local_error);
g_clear_error (&local_error);
}
}
......@@ -762,17 +729,10 @@ extract_archive_thread (GSimpleAsyncResult *result,
if (! g_file_make_directory (file, cancellable, &local_error)) {
if (! g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_EXISTS))
load_data->error = g_error_copy (local_error);
g_error_free (local_error);
}
if (load_data->error == NULL) {
GFileInfo *info;
info = _g_file_info_create_from_entry (entry, extract_data);
_g_file_set_attributes_from_info (file, info, cancellable, NULL);
g_hash_table_insert (created_folders, g_object_ref (file), g_object_ref (info));
g_object_unref (info);
g_clear_error (&local_error);
}
if (load_data->error == NULL)
g_hash_table_insert (created_files, g_object_ref (file), _g_file_info_create_from_entry (entry, extract_data));
archive_read_data_skip (a);
break;
......@@ -791,14 +751,14 @@ extract_archive_thread (GSimpleAsyncResult *result,
if (r != ARCHIVE_EOF)
load_data->error = _g_error_new_from_archive_error (archive_error_string (a));
else
_g_file_set_attributes_from_entry (file, entry, extract_data, cancellable, NULL);
g_hash_table_insert (created_files, g_object_ref (file), _g_file_info_create_from_entry (entry, extract_data));
break;
case AE_IFLNK:
if (! g_file_make_symbolic_link (file, archive_entry_symlink (entry), cancellable, &local_error)) {
if (! g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_EXISTS))
load_data->error = g_error_copy (local_error);
g_error_free (local_error);
g_clear_error (&local_error);
}
archive_read_data_skip (a);
break;
......@@ -822,7 +782,7 @@ extract_archive_thread (GSimpleAsyncResult *result,
}
if (load_data->error == NULL)
restore_modification_time (created_folders, cancellable, NULL);
restore_original_file_attributes (created_files, cancellable);
if ((load_data->error == NULL) && (r != ARCHIVE_EOF))
load_data->error = _g_error_new_from_archive_error (archive_error_string (a));
......@@ -832,7 +792,7 @@ extract_archive_thread (GSimpleAsyncResult *result,
g_simple_async_result_set_from_error (result, load_data->error);
g_hash_table_unref (folders_created_during_extraction);
g_hash_table_unref (created_folders);
g_hash_table_unref (created_files);
g_hash_table_unref (checked_folders);
archive_read_free (a);
extract_data_free (extract_data);
......
......@@ -424,6 +424,12 @@ fr_command_7z_delete (FrCommand *command,
if (g_str_has_prefix (scan->data, "@"))
fr_process_add_arg_concat (command->process, "-i!", scan->data, NULL);
if (archive->encrypt_header
&& fr_archive_is_capable_of (archive, FR_ARCHIVE_CAN_ENCRYPT_HEADER))
{
add_password_arg (command, FR_ARCHIVE (command)->password, FALSE);
}
fr_process_add_arg (command->process, "--");
fr_process_add_arg (command->process, command->filename);
......
......@@ -113,7 +113,7 @@ list__process_line (char *line,
filename = get_uncompressed_name_from_archive (comm, comm->filename);
if (filename == NULL)
filename = _g_path_remove_extension (comm->filename);
filename = _g_path_remove_first_extension (comm->filename);
fdata->full_path = g_strconcat ("/", _g_path_get_basename (filename), NULL);
g_free (filename);
......@@ -161,7 +161,7 @@ fr_command_cfile_list (FrCommand *comm)
fdata = file_data_new ();
filename = _g_path_remove_extension (comm->filename);
filename = _g_path_remove_first_extension (comm->filename);
fdata->full_path = g_strconcat ("/",
_g_path_get_basename (filename),
NULL);
......@@ -428,11 +428,11 @@ fr_command_cfile_extract (FrCommand *comm,
/* copy uncompress file to the dest dir */
uncompr_file = _g_path_remove_extension (temp_file);
uncompr_file = _g_path_remove_first_extension (temp_file);
compr_file = get_uncompressed_name_from_archive (comm, comm->filename);
if (compr_file == NULL)
compr_file = _g_path_remove_extension (_g_path_get_basename (comm->filename));
compr_file = _g_path_remove_first_extension (_g_path_get_basename (comm->filename));
dest_file = g_strconcat (dest_dir,
"/",
compr_file,
......@@ -516,7 +516,7 @@ fr_command_cfile_get_capabilities (FrArchive *archive,
if (_g_program_is_available ("lzop", check_command))
capabilities |= FR_ARCHIVE_CAN_READ_WRITE;
}
else if (_g_mime_type_matches (mime_type, "application/x-rzip") ||
else if (_g_mime_type_matches (mime_type, "application/x-rzip") ||
_g_mime_type_matches (mime_type, "application/x-rzip-compressed-tar")) {
if (_g_program_is_available ("rzip", check_command))
capabilities |= FR_ARCHIVE_CAN_READ_WRITE;
......
......@@ -117,6 +117,16 @@ Pathname/Comment
*/
static gboolean
attribute_field_with_space (char *line)
{
/* sometimes when the archive is encrypted the attributes field is
* like this: "* ..A...."
* */
return ((line[0] != ' ') && (line[1] == ' '));
}
static void
parse_name_field (char *line,
FrCommandRar *rar_comm)
......@@ -132,7 +142,7 @@ parse_name_field (char *line,
if (rar_comm->rar5)
/* rar-5 output adds trailing spaces to short file names :( */
name_field = g_strchomp (g_strdup (_g_str_get_last_field (line, 8)));
name_field = g_strchomp (g_strdup (_g_str_get_last_field (line, attribute_field_with_space (line) ? 9 : 8)));
else
name_field = g_strdup (line + 1);
......@@ -210,13 +220,15 @@ process_line (char *line,
/* read file info. */
fields = _g_str_split_line (line, 6);
fields = _g_str_split_line (line, attribute_field_with_space (line) ? 7 : 6);
if (rar_comm->rar5) {
size_field = fields[1];
ratio_field = fields[3];
date_field = fields[4];
time_field = fields[5];
attr_field = fields[0];
int offset = attribute_field_with_space (line) ? 1 : 0;
size_field = fields[1+offset];
ratio_field = fields[3+offset];
date_field = fields[4+offset];
time_field = fields[5+offset];
attr_field = fields[0+offset];
}
else {
size_field = fields[0];
......@@ -654,6 +666,11 @@ fr_command_rar_handle_error (FrCommand *comm,
break;
}
if (strstr (line, "password is incorrect") != NULL) {
fr_error_take_gerror (error, g_error_new_literal (FR_ERROR, FR_ERROR_ASK_PASSWORD, ""));
break;
}
if (strstr (line, "wrong password") != NULL) {
fr_error_take_gerror (error, g_error_new_literal (FR_ERROR, FR_ERROR_ASK_PASSWORD, ""));
break;
......
This diff is collapsed.
This diff is collapsed.
......@@ -140,6 +140,7 @@ char * _g_path_get_dir_name (const char *path);
char * _g_path_remove_level (const char *path);
char * _g_path_remove_ending_separator(const char *path);
char * _g_path_remove_extension (const char *path);
char * _g_path_remove_first_extension (const gchar *path);
gboolean _g_path_is_parent_of (const char *dirname,
const char *filename);
const char * _g_path_get_relative_basename (const char *path,
......