create-link-here@DopeyDave: Add action#658
create-link-here@DopeyDave: Add action#658DopeyDave wants to merge 2 commits intolinuxmint:masterfrom
Conversation
Creates a link (shortcut) in the same folder as a file/folder
added explanation of the difference between Nemo's "Make Link" and this action
|
/review-action |
Nemo Action Review (Automated)
I have all the information needed. Let me write the review. PR Review: create-link-here@DopeyDaveThis action creates a IssuesA.
TARGET="$1"If a user selects multiple files, Fix: Change B. Unnecessary backslash stripping may corrupt filenames
if [[ "$TARGET" == *\\* ]]; then
TARGET="${TARGET//\\}"
fiThis silently strips all backslash characters from filenames. While backslashes in filenames are uncommon on Linux, they are valid characters. This could cause the script to target the wrong file (or a nonexistent one) if a filename legitimately contains backslashes. Can you explain the rationale for this? If nemo is adding escape characters during token expansion, that would be a C. Redundant
MIMETYPE=$(file --mime-type -b "$TARGET")
if [ -d "$TARGET" ]; then
ICON="folder"
elif [[ "$MIMETYPE" == text/* ]]; then
ICON="text"
elif [[ "$MIMETYPE" == application/pdf ]]; then
ICON="application-pdf"
elif [[ "$MIMETYPE" == image/* ]]; then
ICON="image-x-generic"
elif [[ "$MIMETYPE" == audio/* ]]; then
ICON="audio-x-generic"
elif [[ "$MIMETYPE" == video/* ]]; then
ICON="video-x-generic"
else
ICON="application-octet-stream"
fiThis also avoids spawning D. Debug comments should be removed
# Debug note:
# To print to the system log (file: /var/log/syslog),
# in bash, use the following example:
# logger "Target: $TARGET"These personal development notes shouldn't be shipped in the final action. Minor Suggestions
Automated review of 5d48979 — last updated 2026-02-21 21:24 UTC |
New Action: Creates a .desktop shortcut file in this location for a file/folder
Resubmitting #656 with added information in the README to clarify this Action's difference from Nemo's "Make Link". Please read the README for a full explanation.
As stated previously, please contact me with any questions about the Action, especially if anything is unclear to you.