Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自动生成 *.WebDAV 文件 #9

Open
luckykong opened this issue Dec 14, 2021 · 5 comments
Open

自动生成 *.WebDAV 文件 #9

luckykong opened this issue Dec 14, 2021 · 5 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@luckykong
Copy link

我是使用docker 方式搭建服务器的。

配置文件没有大改,就是设置了一下自己的用户名和密码,以及把中文手册里的“Window 资源管理器"映射网络驱动器"“部分添加进去。

映射到windows 11 资源管理器之后,每次复制文件到服务器上,都会自动生成一个 同文件名但后缀为 WebDAV 的文件。

想咨询一下这是怎么回事? 有什么办法能禁止自动生成这类文件么?

WebDAV文件实例

image

@rexzhang
Copy link
Owner

*.WebDAV 文件是在客户端(你这里就是 Windows11 资源管理器)有执行 PROPPATCH ,同时操作的是非 HTTP 协议中的标准 property 。这个时候 WebDAV 就需要一个地方保存对这个资源的自定义 Property 信息。
不过我看这个内容比较蛋疼,因为 last modified time 是标准的 Property,但是 Windows 用了自定义的 key,这个只能去喷 MS 了
我有考虑过实现一个可选的,集中存储。当时考虑过 SQLite 和 Berkeley DB,不过当时没有好的异步库,自己重新撸一个太累了

@rexzhang
Copy link
Owner

突然想到,似乎可以基于 User Agent 匹配来做个特别的映射,不过需要知道 Windows 的 DAV 客户端这么做是不是有别的什么用意,不然可能弄巧成拙。
另外,最近在折腾别的东西,暂时也没时间去实现

@rexzhang rexzhang added help wanted Extra attention is needed question Further information is requested labels Dec 14, 2021
@plashenkov
Copy link

Yes, I've recently found this too: Windows 10 Explorer creates *.WebDAV files when creating folders or uploading files.

@rexzhang
Copy link
Owner

temporary solution:
ignore it(*.WebDAV) in Config.DirFileIgnore, #13

@rexzhang
Copy link
Owner

今天我用Windows10(Microsoft-WebDAV-MiniRedir/10.0.19045)测试了一下;无论复制还是修改文件都会存储的.WebDAV文件内都是如下内容

{"property": [[["urn:schemas-microsoft-com:", "Win32FileAttributes"], "00000020"]]}

没有修改时间信息,只剩下一个文件属性值,不同版本表现不同?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants