Nautilus 脚本:$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS 对于 WebDAV 文件夹为空
编写 Nautilus 脚本时,$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
给出已单击上下文菜单的文件的路径,例如 /home/nico/test.txt
。
但是,当文件位于 WebDAV 共享中时,该变量为空。
这是一个错误吗?
如何获取 WebDAV 文件的路径?
我的脚本旨在用于WebDAV共享上的文件。
When writing a Nautilus script, $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
gives the path to the file whose context menu has been clicked, for instance /home/nico/test.txt
.
But when the file is within a WebDAV share, the variable is empty.
Is it a bug?
How to get the path for a WebDAV file?
My script is intended to be used for files on WebDAV shares.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我刚刚找到了这个变量列表:
https://help.ubuntu.com/community/NautilusScriptsHowto
我正在寻找的是< code>$NAUTILUS_SCRIPT_SELECTED_URIS,它也适用于 WebDAV,例如返回dav://admin@localhost:8080/alfresco/webdav/User%20Homes/leo/test.txt
I have just found this list of variables:
https://help.ubuntu.com/community/NautilusScriptsHowto
The one I was looking for is
$NAUTILUS_SCRIPT_SELECTED_URIS
, it works on WebDAV too, returning for instancedav://admin@localhost:8080/alfresco/webdav/User%20Homes/leo/test.txt
Nautilus 的
$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
仅适用于本地(已安装)文件,并且根据设计,对于远程文件为空白,例如$1
、$2
...对于远程文件,例如 WebDAV、Samba 网络共享、FTP 服务器(或
$NAUTILUS_SCRIPT_CURRENT_URI
不存在的任何其他位置)file://...
),使用$NAUTILUS_SCRIPT_SELECTED_URIS
Nautilus'
$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
is only for LOCAL (mounted) files, and by design is blank for remote files, like$1
,$2
...For REMOTE files, like WebDAV, or Samba network shares, FTP servers, (or any other location where
$NAUTILUS_SCRIPT_CURRENT_URI
is not likefile://...
), use$NAUTILUS_SCRIPT_SELECTED_URIS