• Potential left-over files when downloading files from within archive

    From Björn Wiberg@2:201/137 to g00r00 on Thu Aug 5 09:27:56 2021
    Hello g00r00!

    As you already know, most archivers are configured in Mystic to junk paths on unpacking.

    I noticed that when viewing an archive which doesn't use the built-in archive viewer -- i.e. the archive is not ZIP/RAR/LHA/LZH -- and which contains files in subdirectories, and selecting (D)ownload File from the archive view prompt (prompt #304), and then entering a path as part of the File Name prompt (prompt #353), e.g. subdir/subdir.txt, Mystic will extract the file (the archiver will junk the paths of the extracted file) and then look for the file as subdir/subdir.txt to send to the user, fail to find it, and the file (named subdir.txt only, not in a subdirectory, as the paths were junked) will be left over in the root of the temp* directory.

    Is there any smart way to avoid this? Could Mystic perhaps perform a 'basename <filename>' on the entered File Name when locating it for download, looking for that name in the root of the temp* directory?

    Note that there *are* reasons for *not* peforming a basename operation to the "%2" argument to the archiver -- only for the download operation! There might be multiple files with the same name in different subdirectories, and letting "%2" contain a path allows the user to specify exactly which file with that name that should be extracted/downloaded.

    Best regards
    Bj”rn

    --- Mystic BBS v1.12 A47 2021/07/31 (Linux/64)
    * Origin: Star Collision BBS, Uppsala, Sweden (2:201/137)