Temporary download filename missbehaving?

Forums » Opera for Windows/Mac/Linux » Opera for Windows

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

20. May 2010, 14:00:22

zlco

Posts: 12

Temporary download filename missbehaving?

Hi,

Interesting problem came to my attention today. I've got this process in place when a file is being
downloaded from the intranet and is opened by specific program via Opera's Downloading file
- open with dialog.

Problem is when opening different files with different content but the same name in this fashion.
What Opera does in general in this situation is it downloads the file into temporary downloads
folder and then calls the associated program with the full filename of downloaded file in parameter.
So far so good.
Now we've got a situation when I want to open the same file again, because I know content of the
file has changed till last time. Now opera wants to download this file into the same temporary download
folder, but finds out this file is already there. So it changes the name in following fashion:
Instead of file.ext, it saves the new file under new name file (1).ext, or file (n).ext where n is
the max reached number for this particular filename +1.
Still good.
Now opera calls the program that should handle this file and passes the parameter. But here comes
the catch, opera passes the old filename BEFORE renaming. So let's say we downloaded file named
file.ext, opera saved it under file (1).ext, then runs the program with file.ext in parameter!!!
Outcome is a disaster. Since the older file still exists, everything seems fine. But the content of the
file opened in our program is old!

I really need to solve this. I tried searching for configuration of this behavior (simply overwriting the
old file instead of renaming it would solve the problem instantly), I tried to find some possibility how to
clean the temporary downloads file from the browser itself, but I had no luck. So I'm asking you guys
for help. I'm desperate.

Thanks in advance for any pointers on this topic!


Cheers.

4. June 2010, 11:27:59

zlco

Posts: 12

Well, since noone seems to know anything about this issue, I reported this as a bug.
Temporary solution (and actually a pretty bad one) is to teach users to find the newest file in Downloads window and open the newest file manually.

9. June 2010, 07:10:44

spadija

Posts: 1643

Confirmed on Opera 10.60 build 3409 (Win 7). I've set up a demo page at http://chaosinacan.com/media/web/opera/download-bug.php which (hopefully) demonstrates the problem. It updates a file with the current time when you view the page, so downloading the file, refreshing, and downloading again will get you new versions in your temporary_downloads folder.

9. June 2010, 11:57:20

zlco

Posts: 12

Thanks for support smile I can't open your link though (connection failed).

Anyway these are steps to reproduce I sent with my bug report. Should demonstrate the problem quite clearly:

URL: i.e. http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.33.5.bz2

Steps to reproduce
===================
1. Open this link on system running winrar (or other file of filetype that invokes download dialog and has file associated for opening.)
2. Click OPEN in download file dialog -> file opens in winrar.
3. Open this link again. In case caching is off (as requested either by user or server) download starts again, this time the file is saved as patch-2.6.33.5 (1).bz2 into temporary downloads folder.
4. Download dialog appears again, click Open again.
5. Winrar starts but opens file patch-2.6.33.5.bz2 instead of patch-2.6.33.5 (1).bz2.


I'm recommending winrar for reproduction because a) it's usually associated with bz2 files, b) you can
clearly see the filename opened in the title of the application.

Bug is filed as DSK-300880.

9. June 2010, 16:46:11 (edited)

spadija

Posts: 1643

My host has been a bit finicky recently. The site seems to be back up now.

Edit: Now that I'm at my computer with Opera, your method probably shows it a bit more clearly than mine.

10. June 2010, 15:05:35

zlco

Posts: 12

Presuming you have winrar installed it's clear and easy indeed. I like how you're page generates new content for the file though, it
demonstrates the problem really well also, thank you.

10. June 2010, 16:19:47

spadija

Posts: 1643

His demo works perfectly with 7zip as well.

8. August 2010, 13:13:49

Phoen1x

Posts: 4

Need open files with dfferent content. Opera will download it's into temp folder with different name (add suffix (2), (3), .... (n)), but open alway without suffix. Need override or open file with suffix.

8. August 2010, 14:24:36

spadija

Posts: 1643

For a workaround, save the file somewhere else and open it manually from the downloads panel/tab. By the very nature of the bug, there is no override, since it's not supposed to be doing that in the first place.

8. August 2010, 18:52:44

Phoen1x

Posts: 4

In download page all ok. Problem only if i choose "Open" in download dialog. File download with suffix, but open without it.

10. August 2010, 14:04:04

zlco

Posts: 12

sad thing is the guys from opera don't seem to be willing to do anything about it...

10. August 2010, 16:38:22

spadija

Posts: 1643

Since Opera does not have a public bug tracker, there's no way you can be sure about that. It's entirely possible that a fix will show up in the next snapshot. It's also possible that the bug is queued up behind higher priority bugs and hasn't been worked on yet.

Just because a fix hasn't shown up yet doesn't mean Opera isn't willing to fix it. That said, I'd like to see a fix sooner than later.

11. August 2010, 15:40:50

zlco

Posts: 12

Sure, you're right, It's just I've been following all releases since I posted this and none of my bugs (I posted two) got fixed in three months, which is kind of discouraging... I'd love to know at least if it's somewhere in a queue for fixing or if they dismissed it altogether. Since - as you correctly stated - there's no public bug tracker, there's no way of knowing.

11. August 2010, 15:52:49

spadija

Posts: 1643

Yeah, I'd love to see the status on some bugs I reported back at the first 10.50 alphas, but it doesn't look like they'll be switching to a public tracker any time soon.

20. August 2010, 22:59:31

rwhirn

Posts: 23

This is a REALLY irritating bug. Cost me MANY hours of work as I was testing a program that generated a CSV file. I kept making changes to the program and generating the new file, clicking OPEN in the download dialog and then it would pop open in Excel and nothing had changed. I was up to version (15).csv before I realized I was still looking at the original CSV.

Still broken in 10.61. Opera PLEASE fix!

26. August 2010, 18:28:46

Phoen1x

Posts: 4

Very very very please..... I can't work normaly....

Forums » Opera for Windows/Mac/Linux » Opera for Windows