                 if let index = indexes.first {
                     self.getfiles = false
                     self.restorebutton.title = "Estimate"
+                    self.restorebutton.isEnabled = false
                     self.remoteCatalog.stringValue = ""
-                    self.rsynctableView.isEnabled = false
-                    self.restoretableView.isEnabled = false
                     self.rsyncindex = index
                     self.copyFiles = CopySingleFiles(index: index)
                     self.working.startAnimation(nil)

        let answer = Alerts.dialogOKCancel("Copy single files or directory", text: "Start restore?")
        if answer {
            self.restorebutton.isEnabled = false
            self.rsynctableView.isEnabled = false
            self.restoretableView.isEnabled = false
            self.getfiles = true
            self.workingRsync.startAnimation(nil)
            self.copyFiles!.executeRsync(remotefile: remoteCatalog!.stringValue, localCatalog: localCatalog!.stringValue, dryrun: false)


extension ViewControllerCopyFiles: DismissViewController {
    func dismiss_view(viewcontroller: NSViewController) {
        self.dismissViewController(viewcontroller)
    }
}
