You are missing a comma between "**"
and "*#{METADATA_FILE_EXTENSION}"
, so the strings are getting combined too early ("a" "b" == "ab"
)
here is your original code for building the path:
temp_dir = "/tmp"
METADATA_FILE_EXTENSION = ".metadata"
puts File.join(temp_dir, "**" "*#{METADATA_FILE_EXTENSION}")
# => /tmp/***.metadata
and fixed:
temp_dir = "/tmp"
METADATA_FILE_EXTENSION = ".metadata"
puts File.join(temp_dir, "**", "*#{METADATA_FILE_EXTENSION}")
# => /tmp/**/*.metadata
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…