Skip to content

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