|
|
|
@ -155,6 +155,7 @@ $filename title changed |
|
|
|
|
Please resolve manually" |
|
|
|
|
else |
|
|
|
|
mv "$filename" "$newFilename" |
|
|
|
|
[ -e "$filename.yaml" ] && mv "$filename.yaml" "$newFilename.yaml" |
|
|
|
|
if fileInDB "$filename"; then |
|
|
|
|
echo "UPDATE items |
|
|
|
|
SET (filename,title) = |
|
|
|
@ -169,6 +170,7 @@ Please resolve manually" |
|
|
|
|
sqlite3 "${sqliteFile}" |
|
|
|
|
|
|
|
|
|
fi |
|
|
|
|
getYamlTags "$filename" | assignTags "$filename" |
|
|
|
|
gitChange "$filename" "$newFilename" |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
@ -187,6 +189,7 @@ deleteFile(){ |
|
|
|
|
read -r rsp |
|
|
|
|
if [[ "$(echo "$rsp" | tr '[:upper:]' '[:lower:]')" = "y"* ]]; then |
|
|
|
|
rm "$filename" |
|
|
|
|
[ -e "$filename.yaml" ] && rm "$filename.yaml" |
|
|
|
|
# This deletes the file from the sql database and any tag links |
|
|
|
|
echo "DELETE FROM items |
|
|
|
|
WHERE id = '$(safeSQL "$fileID")'; |
|
|
|
|