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

Windows reserved filenames #181

Open
@bernardoadc

Description

@bernardoadc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions