Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

fix Copy Over "cannot stat" error #38

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

Conversation

kaributena
Copy link

Force destination dir to be absolute, so as to avoid problems with wildcards in COPYMASKS
Use a consistent method for escaping wildcard and filename substitution in COPYMASKS

This fixes three issues:

  • wildcards in COPYMASKS are expanded correctly when testing for existence, but are not expanded at all in the copy command. Result: 'cannot stat' error message and nothing gets copied.
  • the copy command is executed for all items in COPYMASKS, even if they do not exist. Result: false 'cannot stat' error message.
  • in COPYMASKS you use a backslash escape for "*" wildcard, but no escape for "[" filename substitution.

Example of error output, when there exists a directory called Covers, which fails to be copied, and there is nothing matching '*.log' but we still try to copy it - and fail.

"
Copying files:
+> Covers
cp: cannot stat 'MyDir/[Cc]overs': No such file or directory
cp: cannot stat 'MyDir/*.log': No such file or directory
"

Force destination dir to be absolute, so as to avoid problems with wildcards in COPYMASKS
Use a consistent method for escaping wildcard and filename substitution in COPYMASKS

This fixes three issues:

 - wildcards in COPYMASKS are expanded correctly when testing for existence, but are not expanded at all in the copy command. Result: 'cannot stat' error message and nothing gets copied.
 - the copy command is executed for all items in COPYMASKS, even if they do not exist. Result: false 'cannot stat' error message.
- in COPYMASKS you use a backslash escape for "*" wildcard, but no escape for "[" filename substitution.

Example of error output, when there exists a directory called Covers, which fails to be copied, and there is nothing matching '*.log' but we still try to copy it - and fail.

"
Copying files:
   +> Covers
cp: cannot stat 'MyDir/[Cc]overs': No such file or directory
cp: cannot stat 'MyDir/*.log': No such file or directory
"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant