Skip to content

Commit ae3306d

Browse files
authored
Merge pull request #8 from d-e-s-o/master
Fix handling of file names beginning with dash
2 parents ab90284 + f53112f commit ae3306d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pdf2remarkable.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ for pdfname in "$@" ; do
9595
uuid=$(uuidgen)
9696

9797
# Copy the PDF file itself
98-
cp "$pdfname" ${tmpdir}/${uuid}.pdf
98+
cp -- "$pdfname" ${tmpdir}/${uuid}.pdf
9999

100100
# Add metadata
101101
# The lastModified item appears to contain the date in milliseconds since Epoch
@@ -110,7 +110,7 @@ for pdfname in "$@" ; do
110110
"synced": false,
111111
"type": "DocumentType",
112112
"version": 1,
113-
"visibleName": "$(basename "$pdfname" .pdf)"
113+
"visibleName": "$(basename -- "$pdfname" .pdf)"
114114
}
115115
EOF
116116

0 commit comments

Comments
 (0)