ソースを参照

Clean up file paths

Zachary Kotlarek 12 年 前
親
コミット
d07cc5e186
1 ファイル変更、3 行追加、0 行削除
  1. 3 0
      discToMkv.sh

+ 3 - 0
discToMkv.sh

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