split2flac icon indicating copy to clipboard operation
split2flac copied to clipboard

fix Copy Over "cannot stat" error

Open kaributena opened this issue 7 years ago • 0 comments

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 "

kaributena avatar Jan 19 '19 16:01 kaributena