~jeremywootten/pantheon-files/fix-1604300-merge-find-functionalities-part1

« back to all changes in this revision

Viewing changes to libcore/gof-directory-async.vala

  • Committer: Jeremy Wootten
  • Date: 2017-01-13 13:31:06 UTC
  • mfrom: (2412.1.32 pantheon-files)
  • Revision ID: jeremy@elementaryos.org-20170113133106-v9l164ms13lh3p0a
Merge trunk to r2444 and resolve conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/***
2
2
    Copyright (C) 2011 Marlin Developers
3
 
                  2015-2016 elementary LLC (http://launchpad.net/elementary) 
 
3
                  2015-2017 elementary LLC (http://launchpad.net/elementary) 
4
4
 
5
5
    This program is free software: you can redistribute it and/or modify
6
6
    it under the terms of the GNU General Public License as published by
751
751
    }
752
752
 
753
753
    private void notify_file_removed (GOF.File gof) {
754
 
        if (!gof.is_hidden || Preferences.get_default ().pref_show_hidden_files)
 
754
        if (!gof.is_hidden || Preferences.get_default ().pref_show_hidden_files) {
755
755
            file_deleted (gof);
 
756
        }
756
757
 
757
758
        if (!gof.is_hidden && gof.is_folder ()) {
758
759
            /* remove from sorted_dirs */
877
878
        bool found;
878
879
 
879
880
        foreach (var loc in files) {
880
 
            assert (loc != null);
 
881
            if (loc == null) {
 
882
                continue;
 
883
            }
 
884
 
881
885
            Async? dir = cache_lookup_parent (loc);
882
886
 
883
887
            if (dir != null) {
893
897
                if (!found)
894
898
                    dirs.append (dir);
895
899
            } else {
896
 
                warning ("parent of deleted file not found");
 
900
                dir = cache_lookup (loc);
 
901
                if (dir != null) {
 
902
                    dir.file_deleted (dir.file);
 
903
                }
897
904
            }
898
905
        }
899
906