summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Soriano <csoriano@gnome.org>2017-04-22 22:36:08 +0200
committerCarlos Soriano <csoriano@gnome.org>2017-04-22 22:36:08 +0200
commit073ae42a8b9416f552a757de93ec11d7b22d485b (patch)
tree32d77eb426ac6101805aa4abd500b620fe86b85a
parent891c0dcb760456b4ffcb9a0d252bc78f67af320e (diff)
downloadnautilus-073ae42a8b9416f552a757de93ec11d7b22d485b.tar.gz
Revert "file-operations: check filespace before extracting"
This reverts commit cc9511bb18975dde0ea806395d02b8e60176923f. Also breaks string freeze
-rw-r--r--src/nautilus-file-operations.c49
1 files changed, 1 insertions, 48 deletions
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index e4a3cf465..125be8d55 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -8384,51 +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;
- 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);
-
- /* FIXME: G_MAXUINT64 is the value used by autoar when the file size cannot
- * be determined. Ideally an API should be used instead.
- */
- if (total_size != G_MAXUINT64 && total_size > free_size )
- {
- nautilus_progress_info_take_status (extract_job->common.progress,
- g_strdup_printf (_("Error extracting ā€œ%sā€"),
- basename));
- run_error (&extract_job->common,
- g_strdup_printf (_("Not enough free space to extract %s"),basename),
- NULL,
- NULL,
- FALSE,
- CANCEL,
- NULL);
-
- abort_job ((CommonJob *) extract_job);
- }
-}
-
-static void
report_extract_final_progress (ExtractJob *extract_job,
gint total_files)
{
@@ -8528,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);