diff options
author | Carlos Soriano <csoriano@gnome.org> | 2017-03-27 21:01:15 +0200 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2017-03-27 21:01:15 +0200 |
commit | 77e5bfbd57e7d5c3b372718151b83c181c69e7de (patch) | |
tree | f17be6e6a751a764a74d4613437df93e0272c195 | |
parent | 9e92f6e7ac6dfd3232534e4b523c92eb64aa8e1b (diff) | |
download | nautilus-77e5bfbd57e7d5c3b372718151b83c181c69e7de.tar.gz |
Revert "extraction: check filespace before extraction"
This reverts commit 89f1113c4d3c1a108b1706fee82b742fbaaa708d.
-rw-r--r-- | src/nautilus-file-operations.c | 50 |
1 files changed, 1 insertions, 49 deletions
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c index 170449794..125be8d55 100644 --- a/src/nautilus-file-operations.c +++ b/src/nautilus-file-operations.c @@ -8384,52 +8384,6 @@ extract_job_on_completed (AutoarExtractor *extractor, } static void -extract_job_on_scanned (AutoarExtractor *extractor, - guint total_files, - gpointer user_data) -{ - guint64 total_size; - ExtractJob *extract_job; - GFile *source_file; - g_autofree gchar *basename; - gint response_id; - GFileInfo *fsinfo; - guint64 free_size; - - extract_job = user_data; - total_size = autoar_extractor_get_total_size(extractor); - source_file = autoar_extractor_get_source_file (extractor); - basename = get_basename (source_file); - - fsinfo = g_file_query_filesystem_info (source_file, - G_FILE_ATTRIBUTE_FILESYSTEM_FREE "," - G_FILE_ATTRIBUTE_FILESYSTEM_READONLY, - &extract_job->common.cancellable, - NULL); - free_size = g_file_info_get_attribute_uint64 (fsinfo, - G_FILE_ATTRIBUTE_FILESYSTEM_FREE); - - if (total_size > free_size && total_size != -1) - { - nautilus_progress_info_take_status (extract_job->common.progress, - g_strdup_printf (_("Error extracting ā%sā"), - basename)); - response_id = run_error (&extract_job->common, - g_strdup_printf (_("Not enough free space to extract %s"),basename), - NULL, - NULL, - FALSE, - CANCEL, - NULL); - - if (response_id == 0 || response_id == GTK_RESPONSE_DELETE_EVENT) - { - abort_job ((CommonJob *) extract_job); - } - } -} - -static void report_extract_final_progress (ExtractJob *extract_job, gint total_files) { @@ -8529,9 +8483,7 @@ extract_task_thread_func (GTask *task, autoar_extractor_set_notify_interval (extractor, PROGRESS_NOTIFY_INTERVAL); - g_signal_connect (extractor, "scanned", - G_CALLBACK (extract_job_on_scanned), - extract_job); + g_signal_connect (extractor, "error", G_CALLBACK (extract_job_on_error), extract_job); |