Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Windows reserved filenames #181

Open
bernardoadc opened this issue Aug 5, 2022 · 0 comments
Open

Windows reserved filenames #181

bernardoadc opened this issue Aug 5, 2022 · 0 comments

Comments

@bernardoadc
Copy link

Describe the Issue

This happened in a database which had a schema named "aux". Nothing uncommon, ssc actually was able to create file "aux.sql". However, git was not able to add to index. After some research, it turned out to be a Windows issue. All said, I think it is still relevant for this package since it prevents users from versioning some databases (although very specific case, but can be kept here with low priority).

 Naming Files, Paths, and Namespaces:

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.

Expected behavior

Normal usage of the package, versioning scripted files in git on Windows.

Steps to Reproduce

CREATE SCHEMA Aux
CREATE SCHEMA con
CREATE SCHEMA prn
  1. Generate database scripts

  2. Try to commit files in Windows

Other Information

A workaround could simply be detect OS and monitor those reserved filenames, and add ANY string to it: "_aux.sql" works just fine, for example. The content of the script has no effect. Verify if would compromise pushes somehow.

PS.: not much free time now, but I could PR this in the future.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant