[nautilus/wip/antoniof/local_vs_native_fixup: 79/90] files-view: Drop unnecessary precondition check




commit 206957070eb17776b95e1286e288267d631c3abc
Author: António Fernandes <antoniof gnome org>
Date:   Wed May 13 00:52:28 2020 +0100

    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

 src/nautilus-files-view.c | 2 --
 1 file changed, 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]