              logger.debug("Appending to existing cache")
              cache = np.concatenate((cache, samples))[-num_images:]
          self._previewcache["images"] = cache
          logger.debug("Cache shape: %s", self._previewcache["images"].shape)
  
      def _place_previews(self, frame_dims):
          """ Format the preview thumbnails stored in the cache into a grid fitting the display
          panel.
  
 
</s> remove         self._load_images_to_cache(image_files, frame_dims, thumbnail_size)
 </s> add         if not self._load_images_to_cache(image_files, frame_dims, thumbnail_size):
            logger.debug("Failed to load any preview images")
            if gui_preview in image_files:
                # Reset last modified for failed loading of a gui preview image so it is picked
                # up next time
                self._previewcache["modified"] = None
            return
 </s> remove             img = Image.open(fname)
 </s> add             try:
                img = Image.open(fname)
            except PermissionError as err:
                logger.debug("Permission error opening preview file: '%s'. Original error: %s",
                             fname, str(err))
                dropped_files.append(fname)
                continue
        return True
              logger.debug("Appending to existing cache")
              cache = np.concatenate((cache, samples))[-num_images:]
          self._previewcache["images"] = cache
          logger.debug("Cache shape: %s", self._previewcache["images"].shape)
        return True
  
      def _place_previews(self, frame_dims):
          """ Format the preview thumbnails stored in the cache into a grid fitting the display
          panel.
  
keep keep keep add keep keep keep keep keep
 bugfix: lib.gui.utils - Catch permission error on preview image load 
lib/gui/utils.py