Skip to content
Snippets Groups Projects
Commit 1b39bf8d authored by rswindell's avatar rswindell
Browse files

Fix issue where Share Avatar Collections imported from FTN were saved as files

in data/fido with the node number encoded twice (once in hex and once in
decimal):
006702c1.705.VERT.misc.bin

This is a harmless bug, but an unintentional one. It would also result in
unexpected filenames in text/avatars:
705.VERT.misc.bin

So... this commit should remove the "705." from these filenames.
parent b49468ad
Branches
Tags
No related merge requests found
......@@ -195,7 +195,9 @@ function import_shared_file(hdr, body)
// If the filename (in the subject) already contains the sender's QWK-ID, skip-it
var filename = file_getname(hdr.subject);
var prefix = file_getname(hdr.from_net_addr) + '.';
var prefix = '';
if(!fidoaddr.is_valid(hdr.from_net_addr))
prefix = file_getname(hdr.from_net_addr) + '.';
var suffix = '.bin';
if(filename.length > prefix.length + suffix.length
&& filename.substr(0, prefix.length).toLowerCase() == prefix.toLowerCase())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment