protected function validateDestinationDirectoryCopy()
    {
        if ($this->isError()) {
            return null;
        }

        $initial_path = $this->scanner->getInitialPath(true);
        $directory = gplcart_path_normalize("$initial_path/" . $this->getSubmitted('destination'));

        if (!file_exists($directory) && !mkdir($directory, 0777, true)) {
            $this->setError('destination', $this->translation->text('Destination does not exist'));
            return false;
        }

        if (!is_dir($directory)) {
            $this->setError('destination', $this->translation->text('Destination is not a directory'));
            return false;
        }

        if (!is_writable($directory)) {
            $this->setError('destination', $this->translation->text('Directory is not writable'));
            return false;
        }

        $this->setSubmitted('directory', $directory);
        return true;
    }