summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2020-05-13 00:52:28 +0100
committerOndrej Holy <oholy@redhat.com>2021-01-25 10:54:11 +0000
commit206957070eb17776b95e1286e288267d631c3abc (patch)
tree6fb8e905f06e91cfb8927e0400aa43567c6305c2
parent1ef42ee77ccc11f7131ff002a6061f70ee879bb5 (diff)
downloadnautilus-206957070eb17776b95e1286e288267d631c3abc.tar.gz
files-view: Drop unnecessary precondition check
When creating a file from template, we fail if the template's not local This was introduced by commit e5e83363ca306025ccbf328ed7bf782fda58eb81 The assumption of being local comes from the original version of that patch[1], which used filenames instead of URIs, as later explained[2]: > I was sure that templates will be only stored on the local disk, > ignoring that we have to pass URIs to GnomeVFS anyway. As a result of the review process, the usage of filenames was dropped in favor of URIs, but the precondition check remained, even though it was no longer necessary. Remove it now. [1] https://mail.gnome.org/archives/nautilus-list/2005-June/msg00008.html [2] https://mail.gnome.org/archives/nautilus-list/2005-June/msg00176.html
-rw-r--r--src/nautilus-files-view.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 1e5d0fd2d..43c56ef7a 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -2445,8 +2445,6 @@ nautilus_files_view_new_file (NautilusFilesView *directory_view,
return;
}
- g_return_if_fail (nautilus_file_is_local (source));
-
data = setup_new_folder_data (directory_view);
source_uri = nautilus_file_get_uri (source);