Created attachment 497500 [details] files renaming Build Identifier: Mozilla/5.0 (Android; Linux armv7l; rv:2.0b8pre) Gecko/20101213 Firefox/4.0b8pre Fennec/4.0b3pre Device Samsung Galaxy S Captivated Steps to reproduce: 1. Download several times same file. (htm, pdf, iso) 2. Slide page to left and go to Download Manager 3. Take a look at two identical files. Expected result: - the files should be rename as : file-2.pdf file-1.pdf file.pdf Actual result: - iso and pdf files are renamed with "-1" "-2" - htm files are renamed with "(2)" "(3)" ex: romania.pdf romania-1.pdf romania-2.pdf romania.htm romania(2.htm // no 1 present
I suspect this has to do with whether or not the files are created through the download manager or through an nsIWebBrowserPersist. The persist method has its own functions to create unique filenames and is used you call "Save Image", "Save Page", or resume a download: http://mxr.mozilla.org/mozilla-central/source/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp#1965 The other files are running through nsIExternalHelperAppService which uses nsIFile.createUnique (in various different places depending on what we are doing with the download). The nameing scheme used by both should probably match.
not a blocking bug, but we should consistently associate file names convention.
TC https://litmus.mozilla.org/single_result.cgi?id=427155 fails due to this bug.
Component: General → General
Product: Fennec → Fennec Native
Still an issue; reproducible just save as PDF a few times on a site, and download zip's here e.g, http://ftp.mozilla.org/pub/mozilla.org/mobile/releases/24.0b10/android/multi/, pdf's use a <filename>-<n>.pdf, zips use a <filename>(n).zip for example
Whiteboard: [fennec 6.0b1]
I would like to patch this bug. Can someone provide me with mxr/dxr links? Thanks!!
(In reply to Manu Jain from comment #5) > I would like to patch this bug. Can someone provide me with mxr/dxr links? > Thanks!! This isn't currently a mentor bug, but maybe wesj would be able to help you out. If you want to try investigating on your own, you can start by digging into that link he provided in comment 1.
The web browser persist code has moved, but now its just at: http://mxr.mozilla.org/mozilla-central/source/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp#1912 I'm not sure why that doesn't use nsIFile.createUnique instead. I'll ping bsmedberg in here. Maybe he knows. This is really a platform bug if someone wants to move it.
Flags: needinfo?(wjohnston) → needinfo?(benjamin)
I really don't know why, that code is all really old.
You need to log in before you can comment on or make changes to this bug.