Sublimetext2 Fedora 18&;升华文本2:无法删除文件

Sublimetext2 Fedora 18&;升华文本2:无法删除文件,sublimetext2,fedora,Sublimetext2,Fedora,我有Fedora 18和Sublime Text 2 我无法从Sublime Text 2 UI中删除项目中的文件。 当我尝试删除某些文件时,Console会显示以下内容: Traceback (most recent call last): File "./sublime_plugin.py", line 337, in run_ File "./side_bar.py", line 19, in run File "./send2trash/plat_ot


我有Fedora 18和Sublime Text 2
我无法从Sublime Text 2 UI中删除项目中的文件。

当我尝试删除某些文件时,Console会显示以下内容:

Traceback (most recent call last): File "./sublime_plugin.py", line 337, in run_ File "./side_bar.py", line 19, in run File "./send2trash/plat_other.py", line 153, in send2trash File "./send2trash/plat_other.py", line 121, in find_ext_volume_trash File "./send2trash/plat_other.py", line 115, in find_ext_volume_fallback_trash File "./send2trash/plat_other.py", line 60, in check_create File ".\os.py", line 157, in makedirs OSError: [Errno 13] Permission denied: '/.Trash-1000' 回溯(最近一次呼叫最后一次): 文件“/sublime_plugin.py”,第337行,运行中_ 文件“/side_bar.py”,第19行,运行中 文件“/send2trash/plat_other.py”,第153行,在send2trash中 文件“/send2trash/plat_other.py”,第121行,在查找外部卷垃圾箱中 文件“/send2trash/plat_other.py”,第115行,位于查找外部卷回退垃圾箱中 文件“/send2trash/plat_other.py”,第60行,在check_create中 文件“\os.py”,第157行,在makedirs中 OSError:[Errno 13]权限被拒绝:'/.Trash-1000' 我需要你的帮助:)

这是Python库的一个bug。这是因为您的文件位于与垃圾箱文件夹不同的装入点

如果已在不同分区中装入了
/
/home
,则send2trash library无法将文件移动到垃圾箱文件夹(通常位于
/home//.local/share/trash/
中)。因此,删除过程尝试定位包含文件的硬链接;在本例中,它是
/
。在此目录中,它查找
垃圾-
文件夹

Linux文件管理器的默认行为是提示永久删除,而升华文本中不会发生这种情况。要解决此问题,请键入terminal

sudo mkdir /.Trash-<userid>
sudo chown <user> /.Trash-<userid>
sudo mkdir/.Trash-
sudo chown/.Trash-

现在,您可以删除文件并从此文件夹中恢复。

在我的情况下,我正在处理的项目位于
/data
分区中。我必须创建一个
/data/.Trash-1000
目录和
chown
它才能工作。