Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quotes all paths in mkdir calls #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jrandall
Copy link
Contributor

@jrandall jrandall commented Jan 5, 2016

This addresses the issue in which the shell expands unquoted
paths passed to mkdir and thereby fails to create paths when
they contain wildcard characters that happen to match another
existing path. One failure that this fixes is that output
directories are not always created when chromosome names contain
'' characters, such as when running against the HLA sequences.

An example of the failure would be if an output directory:
/out/all/HLA-A_31:01:02 has been created first, and subsequently
another directory /out/all/HLA-A_01:02 is attempted to be created,
prior to this fix it would not be created because
mkdir -p /out/all/HLA-A*01:02 is expanded by the shell to
match the existing directory (i.e. it is equivalent to
mkdir -p /out/all/HLA-A*31:01:02, and the desired output
directory is not created.

I went ahead and quoted all instances of paths passed to mkdir
because I'm pretty sure there is never a time when you want
wildcard expansion when creating directories.

This addresses the issue in which the shell expands unquoted
paths passed to mkdir and thereby fails to create paths when
they contain wildcard characters that happen to match another
existing path. One failure that this fixes is that output
directories are not always created when chromosome names contain
'*' characters, such as when running against the HLA* sequences.

An example of the failure would be if an output directory:
/out/all/HLA-A*31:01:02 has been created first, and subsequently
another directory /out/all/HLA-A*01:02 is attempted to be created,
prior to this fix it would not be created because
`mkdir -p /out/all/HLA-A*01:02` is expanded by the shell to
match the existing directory (i.e. it is equivalent to
`mkdir -p /out/all/HLA-A*31:01:02`, and the desired output
directory is not created.

I went ahead and quoted *all* instances of paths passed to mkdir
because I'm pretty sure there is never a time when you want
wildcard expansion when creating directories.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant