def dirAction(choice): if choice: if choice[1] == "folder": if not Directories.createDir(ret): self.session.open(MessageBox, _("Creating directory %s failed.") % (ret), type = MessageBox.TYPE_ERROR) return self.close(ret) else: self.cancel()
def dirAction(choice): if choice: if choice[1] == "folder": if not Directories.createDir(ret): self.session.open(MessageBox, _("Creating directory %s failed.") % (ret), type = MessageBox.TYPE_ERROR) return self.close(ret) else: self.cancel()
def createDirCallback(self, res): if res: path = os.path.join(self['filelist'].current_directory, res) if not os.path.exists(path): if not Directories.createDir(path): self.session.open(MessageBox, _('Creating directory %s failed.') % path, type=MessageBox.TYPE_ERROR, timeout=5) self['filelist'].refresh() else: self.session.open(MessageBox, _('The path %s already exists.') % path, type=MessageBox.TYPE_ERROR, timeout=5)
def createDirCallback(self, res): if res: path = os.path.join(self["filelist"].current_directory, res) if not os.path.exists(path): if not Directories.createDir(path): self.session.open(MessageBox, _("Creating directory %s failed.") % (path), type=MessageBox.TYPE_ERROR, timeout=5) self["filelist"].refresh() else: self.session.open(MessageBox, _("The path %s already exists.") % (path), type=MessageBox.TYPE_ERROR, timeout=5)