In extract_asmt_for_moss, pathname.gsub!(%r{/}, "-") is performed to "flatten" nested directories.
However, if a file's pathname starts with ./, e.g. ./file, it would be renamed into the dotfile .-file. (This happens if you tar the archive via e.g. tar -cf tarred ./file1 ./file2 instead of tar -cf tarred file1 file2)
MOSS then fails to find the file since the glob expansion of assDir/*/{pattern} does not appear to include dotfiles.
To remedy this, either avoid replacing any ./ at the start of pathnames, or prepend some text after the replacement, e.g. pathname.prepend("extracted-").
In
extract_asmt_for_moss
,pathname.gsub!(%r{/}, "-")
is performed to "flatten" nested directories.However, if a file's pathname starts with
./
, e.g../file
, it would be renamed into the dotfile.-file
. (This happens if you tar the archive via e.g.tar -cf tarred ./file1 ./file2
instead oftar -cf tarred file1 file2
)MOSS then fails to find the file since the glob expansion of
assDir/*/{pattern}
does not appear to include dotfiles.To remedy this, either avoid replacing any
./
at the start of pathnames, or prepend some text after the replacement, e.g.pathname.prepend("extracted-")
.