SideBar.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:.sublime 作者: cxdongjack 项目源码 文件源码
def run(self):
        old = self.old
        new = self.new
        key = self.key
        window_set_status(key, 'Moving…')

        item = SideBarItem(old, os.path.isdir(old))
        try:
            if not item.move(new):
                if SideBarItem(new, os.path.isdir(new)).overwrite():
                    self.run()
                else:
                    window_set_status(key, '')
                    SideBarMoveCommand(sublime_plugin.WindowCommand).run([old], new)
                return
        except:
            window_set_status(key, '')
            sublime.error_message("Unable to move:\n\n"+old+"\n\nto\n\n"+new)
            SideBarMoveCommand(sublime_plugin.WindowCommand).run([old], new)
            raise
            return
        SideBarProject().refresh();
        window_set_status(key, '')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号