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

« back to all changes in this revision

Viewing changes to src/View/AbstractDirectoryView.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
 
    Copyright (c) 2015-2016 elementary LLC (http://launchpad.net/elementary)
 
2
    Copyright (c) 2015-2017 elementary LLC (http://launchpad.net/elementary)
3
3
 
4
4
    This program is free software: you can redistribute it and/or modify it
5
5
    under the terms of the GNU Lesser General Public License version 3, as published
1283
1283
            /* Can be called twice for same file - once via Marlin.FileOperations and once via directory FileMonitor.
1284
1284
             * Model.remove_file returns false if the file was already removed.
1285
1285
             */
1286
 
            if (model.remove_file (file, dir)) {
1287
 
                remove_marlin_icon_info_cache (file);
1288
 
                if (file.is_folder ()) {
1289
 
                    var file_dir = GOF.Directory.Async.cache_lookup (file.location);
1290
 
                    if (file_dir != null) {
1291
 
                        file_dir.purge_dir_from_cache ();
1292
 
                        slot.folder_deleted (file, file_dir);
1293
 
                    }
 
1286
            /* The deleted file could be the whole directory, which is not in the model but that
 
1287
             * that does not matter.  */
 
1288
            model.remove_file (file, dir);
 
1289
 
 
1290
            remove_marlin_icon_info_cache (file);
 
1291
            if (file.is_folder ()) {
 
1292
                /* Check whether the deleted file is the directory */
 
1293
                var file_dir = GOF.Directory.Async.cache_lookup (file.location);
 
1294
                if (file_dir != null) {
 
1295
                    file_dir.purge_dir_from_cache ();
 
1296
                    slot.folder_deleted (file, file_dir);
1294
1297
                }
1295
 
                handle_free_space_change ();
1296
1298
            }
 
1299
            handle_free_space_change ();
1297
1300
        }
1298
1301
 
1299
1302
        private void  on_directory_done_loading (GOF.Directory.Async dir) {