g0v / moedict-data-csld

中華大辭典
109 stars 24 forks source link

在 Windows 無法 git clone 本專案 #5

Open doggy8088 opened 4 months ago

doggy8088 commented 4 months ago

我的命令:

git clone https://github.com/g0v/moedict-data-csld.git --depth=1

執行結果:

Cloning into 'moedict-data-csld'...
remote: Enumerating objects: 47, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (45/45), done.
remote: Total 47 (delta 4), reused 31 (delta 2), pack-reused 0
Receiving objects: 100% (47/47), 68.43 MiB | 6.83 MiB/s, done.
Resolving deltas: 100% (4/4), done.
error: invalid path 'aux.pl'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

節錄重點:

error: invalid path 'aux.pl'
fatal: unable to checkout working tree

經測試可以在 WSL 取得該檔案,不知道為何 Windows 不行!

doggy8088 commented 4 months ago

找到問題了!

命名檔案、路徑和命名空間 文件中這樣寫:

請勿使用下列保留名稱作為檔案名:

CON、PRN、AUX、NUL、COM0、COM1、COM2、COM3、COM4、COM5、COM6、COM7、COM8、COM9、COM1、LPT0、LPT1、LPT2、LPT3、LPT4、LPT5、LPT6、LPT7、LPT8、LPT9、LPT≦、LPT1、LPT1 和 LPT≦。 也請避免這些名稱緊接在延伸模組後面;例如,NUL.txt和NUL.tar.gz都相當於 NUL。 如需詳細資訊,請參閱命名空間

因此 aux 不能拿來當成「檔名」!🔥