This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
Replies: 1 comment
-
我目前的做法是,如果文件名过长,就是直接取md5,会丢失部分信息,但是可以保证写入成功 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
根据现有资料,linux文件名长度最大255字节,超过就会报错:ENAMETOOLONG (36)
对于GoLang默认的webdav实现,如果尝试以CREATE模式打开并创建一个文件肯定会报错,然后就会返回404:
https://cs.opensource.google/go/x/net/+/master:webdav/webdav.go;l=268
singlefile对于404的做法是重试,因为他认为这里的404是因为路径不存在,就会尝试创建目录,然后再次调用自己,然而这个问题重试是不会解决问题的,而且重试还不会限制次数,因为这里是一个递归调用,并且没有跳出条件
https://github.com/gildas-lormeau/SingleFile/blob/master/src/core/bg/downloads.js#L227
Beta Was this translation helpful? Give feedback.
All reactions