/**
  * Set the exclude rules
  *
  * @param mixed $excludes A comma separated list or array of exclude rules
  * @param bool $append Whether to replace or append to existing rules
  *
  * @return string
  */
 public function set_excludes($excludes, $append = false)
 {
     // Use the validation from Backup::set_excludes
     $this->backup->set_excludes($excludes, $append);
     // If these are valid excludes and they are different save them
     if ($this->backup->get_excludes() && (empty($this->options['excludes']) || $this->options['excludes'] !== $this->backup->get_excludes())) {
         $this->options['excludes'] = $append && !empty($this->options['excludes']) ? array_merge((array) $this->options['excludes'], $this->backup->get_excludes()) : $this->backup->get_excludes();
         $this->backup->set_excludes($this->options['excludes']);
     }
 }