]> source.dussan.org Git - gitea.git/commit
Convert max file name length to 255 (#30489)
authoryp05327 <576951401@qq.com>
Mon, 15 Apr 2024 19:08:31 +0000 (04:08 +0900)
committerGitHub <noreply@github.com>
Mon, 15 Apr 2024 19:08:31 +0000 (19:08 +0000)
commit2c80421243ed1fd6f53c3e1a84c06648524f7c66
tree99f1c5eea776507ffc4ad132e61c63649c232d9a
parent3b40ebf895307a705738df3c5aba31843f0be74d
Convert max file name length to 255 (#30489)

Quick/Partly fix #29907

In Linux and MacOS, by default the max file name length is 255.
In windows, it depends on the version and settings, and has no file name
length limitation, but has path length limitation.
By default it is 260, considering path length is longer than filename,
so I think it is ok to do this.

For Windows, see
https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation?tabs=registry
For Linux, see
https://github.com/torvalds/linux/blob/master/include/uapi/linux/limits.h#L12-L13
For MacOS, see
https://discussions.apple.com/thread/254788848?sortBy=best
templates/repo/editor/edit.tmpl
templates/repo/editor/upload.tmpl