支持隐藏文件夹与文件 #22

Open
zanjie1999 wants to merge 3 commits from zanjie1999/master into master
zanjie1999 commented 2023-02-27 01:05:20 +08:00 (Migrated from github.com)

写了一个功能,你看看有没有必要合进去,这样可以存放一些公开发布的文件以供下载,但不能被全部爬走
如果文件名或目录名以"."开头,比如".config",这个文件或目录就不会出现在列表中,但是可以直接以完整的文件名打开
当一个目录的文件名为"."开头,那将不允许浏览这个目录内的文件列表(返回Access denied),但是如果拥有完整的路径,文件依然可以访问,举例:
/media/.video/2023/1.mp4
可以浏览/media中的内容,但.video文件夹不会出现
/media/.video和/media/.video/2023的文件列表不可以被浏览(返回Access denied)
访问/media/.video/2023/1.mp4可以正常的下载文件

写了一个功能,你看看有没有必要合进去,这样可以存放一些公开发布的文件以供下载,但不能被全部爬走 如果文件名或目录名以"."开头,比如".config",这个文件或目录就不会出现在列表中,但是可以直接以完整的文件名打开 当一个目录的文件名为"."开头,那将不允许浏览这个目录内的文件列表(返回Access denied),但是如果拥有完整的路径,文件依然可以访问,举例: /media/.video/2023/1.mp4 可以浏览/media中的内容,但.video文件夹不会出现 /media/.video和/media/.video/2023的文件列表不可以被浏览(返回Access denied) 访问/media/.video/2023/1.mp4可以正常的下载文件
n0099 commented 2023-02-27 01:12:29 +08:00 (Migrated from github.com)
经典unix哲学之bug提升到feature https://unix.stackexchange.com/questions/88875/why-are-filenames-that-start-with-a-dot-hidden-can-i-hide-files-without-using-a
SomeBottle commented 2023-02-27 12:13:09 +08:00 (Migrated from github.com)

看上去还不错,不过还得测试一下看看会不会和别的地方起冲突。

看上去还不错,不过还得测试一下看看会不会和别的地方起冲突。
n0099 commented 2023-02-27 15:36:56 +08:00 (Migrated from github.com)

经典用404伪装403

经典用404伪装403
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin zanjie1999/master:zanjie1999/master
git switch zanjie1999/master

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff zanjie1999/master
git switch zanjie1999/master
git rebase master
git switch master
git merge --ff-only zanjie1999/master
git switch zanjie1999/master
git rebase master
git switch master
git merge --no-ff zanjie1999/master
git switch master
git merge --squash zanjie1999/master
git switch master
git merge --ff-only zanjie1999/master
git switch master
git merge zanjie1999/master
git push origin master
Sign in to join this conversation.
No description provided.