taw / magic-preconstructed-decks

Magic: the Gathering Preconstructed Decks
6 stars 9 forks source link

Checkout fails on Windows due to "con" folder being a reserved name #6

Closed magreenblatt closed 5 years ago

magreenblatt commented 5 years ago

Checkout fails on Windows due to "con" folder being a reserved name. From [1]:

Do not use the following reserved names for the name of a file: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also avoid these names followed immediately by an extension; for example, NUL.txt is not recommended.

[1] https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file#file-and-directory-names

Example clone failure:

> git clone https://github.com/taw/magic-preconstructed-decks.git
Cloning into 'magic-preconstructed-decks'...
remote: Enumerating objects: 60, done.
remote: Counting objects: 100% (60/60), done.
remote: Compressing objects: 100% (39/39), done.
remote: Total 2258 (delta 16), reused 53 (delta 13), pack-reused 2198
Receiving objects: 100% (2258/2258), 443.04 KiB | 1.44 MiB/s, done.
Resolving deltas: 100% (904/904), done.
fatal: cannot create directory at 'data/intro-41/con': Invalid argument
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
taw commented 5 years ago

Windows, eh. Anyway, is it working now?

magreenblatt commented 5 years ago

Thanks for the fix, the clone works now. Next problem is files that have a colon (':') in the name. This is what it says for a new/clean checkout:

> git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        deleted:    data/event/rtr/Golgari: Creep and Conquer.txt
        deleted:    data/event/rtr/Rakdos: Wrack and Rage.txt

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        data/event/rtr/Golgari
        data/event/rtr/Rakdos

The files listed as "Untracked" have 0 size on disk.

taw commented 5 years ago

All right. Is it working now?

magreenblatt commented 5 years ago

Working now, thanks :)