Skip to content

Add: give ‘does not exist ERROR’ if a file with a leading question mark is given #8180

@samuelkees

Description

@samuelkees

Bug Report

Description

see Issue name.

Reproduce

I have a dvc folder data with has two files test?test.txt and ?test.txt:

.
└── data
    ├── test?test.txt
    └── ?test.txt

1 directory, 3 files

If I try to add ?test.txt I get this error:

$ dvc add data/\?test.txt
Adding...                                                                               
ERROR: output 'data?test.txt' does not exist

Apparently DVC things I want to add data?test.txt and yes this file does not exist, but this is not what I wanna add. The other file data/test?test.txt I can add without any problems. I thing there is a problem with the leading question mark. I also tested this witch a leading ‘#’, same problem.

My question is: Is this on purpose? I noticed the behavior in DVC version 2.18.1 or so. Befor I hat no problem with leading question marks.

Expected

Just add the file.

Environment information

DVC version: 2.20.0 (deb)
---------------------------------
Platform: Python 3.8.3 on Linux-5.4.0-125-generic-x86_64-with-glibc2.14
Supports:
	http (aiohttp = 3.8.1, aiohttp-retry = 2.8.3),
	https (aiohttp = 3.8.1, aiohttp-retry = 2.8.3),
	ssh (sshfs = 2022.6.0)
Cache types: hardlink, symlink
Cache directory: ext4 on /dev/sda2
Caches: local
Remotes: None
Workspace directory: ext4 on /dev/sda2
Repo: dvc, git

Additional Information (if any):

Metadata

Metadata

Assignees

No one assigned

    Labels

    A: data-managementRelated to dvc add/checkout/commit/move/removebugDid we break something?regressionOhh, we broke something :-(

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions