Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature forget trailing slash #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tasknote
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ VIEWER=cat
# FOLDER to store notes in. Must already exist.
# If you sync tasks, FOLDER should be a location that syncs and is available to
# other computers, i.e. ~/dropbox/tasknotes
FOLDER="~/Dropbox/tasks/notes/"
FOLDER=~/Dropbox/tasks/notes/

# Check for existence of $FOLDER
if [ ! -d $FOLDER ]; then
Expand Down Expand Up @@ -78,8 +78,9 @@ fi
uuid=`$TASKBIN $1 uuids`

# build full path & file name to store notes in
folder=`echo $FOLDER | sed "s|^~|$HOME|"`
file="$folder$uuid$EXT"
# ensure FOLDER ends with a slash
[ "${FOLDER: -1}" != "/" ] && FOLDER=$FOLDER/
file="$FOLDER$uuid$EXT"

# determine if notes file already exists
fileexists=0
Expand Down