Browse Source

Clean up file paths

Zachary Kotlarek 12 năm trước cách đây
mục cha
commit
d07cc5e186
1 tập tin đã thay đổi với 3 bổ sung và 0 xóa
  1. 3 0
      discToMkv.sh

+ 3 - 0
discToMkv.sh

@@ -70,6 +70,9 @@ if [ -z "${NAME}" ]; then
 	exit 1
 fi
 
+# Ensure the name is filesystem-safe
+NAME="`echo "${NAME}" | sed 's%[^a-zA-Z0-9_\-\ ,;\.!@#$\%\^&\*()=\+\?]%_%'`"
+
 # Create the output directory
 if [ ! -d "${OUT_DIR}/${NAME}" ]; then
 	mkdir "${OUT_DIR}/${NAME}"