Closed tobbez closed 4 years ago
After looking a bit at it, there doesn't seem to be much code in MTH concering downloads (basically just a call to browser.downloads.download), so maybe this is a bug in Firefox?
Even if that is the case though, it might be mitigated by waiting until the promise returned by browser.downloads.download
) resolves before calling browser.downloads.download
for the next file.
Thanks. By the commit 82cc1e4 now downloaded files will have unique name.
Short description
In some cases, when using the 'Save Tabs as Files' feature on multiple tabs that contain files with the same base name, MTH will try to download them to the same local path.
Steps to reproduce
example.com/directory1/file.jpg
andexample.com/directory2/file.jpg
.Saved Tabs
directory doesn't already have a file with the same name (file.jpg
in the example).Expected result
MTH attempts to download both files into the same local path (
file.jpg
in the example).Actual result
MTH should download the files into separate paths (
file.jpg
andfile(1).jpg
in the example).Note that the problem does not seem to occur if a file of the same name already exists before you invoke the action (in that case, the files correctly get (1), (2), ... added to the file names).
Environment