safe-rm 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/rm.sh +3 -3
  2. package/package.json +1 -1
package/bin/rm.sh CHANGED
@@ -74,7 +74,7 @@ split_push_arg(){
74
74
  split=`echo ${1:1} | fold -w1`
75
75
 
76
76
  local arg
77
- for arg in "${split[@]}"; do
77
+ for arg in ${split[@]}; do
78
78
  ARG[arg_i]="-$arg"
79
79
  ((arg_i += 1))
80
80
  done
@@ -342,7 +342,7 @@ list_files(){
342
342
  local list=$(ls -A "$1")
343
343
  local f
344
344
 
345
- [[ -n "$list" ]] && for f in $list; do
345
+ [[ -n $list ]] && for f in "$list"; do
346
346
  list_files "$1/$f"
347
347
  done
348
348
  fi
@@ -387,7 +387,7 @@ for file in "${FILE_NAME[@]}"; do
387
387
  fi
388
388
 
389
389
  #the same check also apply on /. /..
390
- if [[ $(basename $file) = "." || $(basename $file) = ".." ]]; then
390
+ if [[ $(basename "$file") = "." || $(basename "$file") = ".." ]]; then
391
391
  echo "$COMMAND: \".\" and \"..\" may not be removed"
392
392
  EXIT_CODE=1
393
393
  continue
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "safe-rm",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "A much safer replacement of bash rm with nearly full functionalities and options of the rm command!",
5
5
  "bin": {
6
6
  "safe-rm": "./bin/rm.sh"