diff options
| Commit | f7971217b53e9375ac9e3517527b9b77a6f2f3d6 (patch) | |
|---|---|---|
| Author | 2023-10-23 14:54:04 +0300 | |
| Committer | 2023-10-23 14:54:04 +0300 | |
| Files | b97a8811376b8c62507edbe0135d6ddd8a084368 | |
| csg-f7971217b53e9375ac9e3517527b9b77a6f2f3d6.tar csg-f7971217b53e9375ac9e3517527b9b77a6f2f3d6.tar.gz csg-f7971217b53e9375ac9e3517527b9b77a6f2f3d6.zip | ||
| Parent | 1f6cf0254bfbb3c954da84f616c08a09a66932be (diff) | |
[p2] Fixed parent folder logic when DESTINATION doesn't exist
1 files changed, 2 insertions, 2 deletions
| -rwxr-xr-x | csg | 4 |
@@ -55,9 +55,9 @@ SOURCE="$1" && csg_help 2 DESTINATION="$(realpath "$2")" -[ ! -d "$DESTINATION/.." ] && echo "[Error] Parent directory of $2 (<destination_dir>) isn't a directory or doesn't exist!" \ +[ ! -d "${DESTINATION%/*}" ] && echo "[Error] Parent directory of $2 (<destination_dir>) isn't a directory or doesn't exist!" \ && csg_help 1 -[ ! -w "$DESTINATION/.." ] && echo "[Error] No write access to parent directory of $2 (<destination_dir>)!" \ +[ ! -w "${DESTINATION%/*}" ] && echo "[Error] No write access to parent directory of $2 (<destination_dir>)!" \ && csg_help 2 TITLEF="$3" |
