Summary: | kget new download dialog sets incorrect name for target file | ||
---|---|---|---|
Product: | [Applications] kget | Reporter: | anton <benderamp> |
Component: | general | Assignee: | KGet authors <kget> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dextermagnific, markinhos, pfeiffer |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
anton
2009-06-24 00:51:25 UTC
I don't see the 'user' part after the Desktop directory, but I see another problem there: whatever you enter as a filename, only the directory part will be used. I.e. if you enter /tmp/foo.jar either with the filedialog or directly into the edit field, the download will be saved to /tmp/scoreninja1.2.jar instead of /tmp/foo.jar. Regression from your patch maybe? It *used* to work before... Lukas Yes, kind of. The parameter destDir in KGet::addTransfer() is used by callers not only to pass the target directory, but also to pass the complete path to the target file (i.e. not a directory, but file). That was not handled correctly (but fixed now). I can't say anything about the original report though -- I don't get the weird additional "user" in there. >That was not handled correctly (but fixed now). I can't say anything about the
original report though -- I don't get the weird additional "user" in there.
user means current user name - in my case this is benderamp:
Destination=/home/benderamp/Desktop/benderamp
This seems to be more directory open dialog issue, rather then kget (or kget misuses it).
This is what I do in more details:
1. Start downloading - the Destination=/home/benderamp/ by default
2. Press directory chooser button - receive directory chooser dialog with title KGet
2.1 The location directory is /home
2.2 Directory "benderamp" is selected inside central file view
2.3 File name field at the bottom also equals "benderamp" (this is important)
3. Click on the selected directory with mouse - enter /home/benderamp directory (important to do this with mouse, not with "Ok" button)
3.1 File name field at the bottom value still equals "benderamp"
4. Click on the Desktop directory with mouse - enter /home/benderamp/Desktop directory
4.1 File name field at the bottom value still equals "benderamp"
5. Press "Ok" button - the Destination value now equals "/home/benderamp/Desktop/benderamp"
So, I can understand why this happens - it takes current directory value (which is Desktop) and treats "benderamp" (which were set as default value in file name field) as a new file name inside it.
There is another scenario - very similar, but a bit different:
1. Start downloading - the Destination=/home/benderamp/ by default
2. Press directory chooser button - receive directory chooser dialog with title KGet
2.1 The location directory is /home
2.2 Directory "benderamp" is selected inside central file view
2.3 File name field at the bottom also equals "benderamp" (this is important)
3. Press "Open" button - this would enter /home/benderamp directory (this is key difference from the previous scenario)
3.1 File name field at the bottom is now empty
4. Click on the Desktop directory with mouse - enter /home/benderamp/Desktop directory
4.1 File name field at the bottom is still empty
5. Press "Ok" button - it will not work (because file name field is empty)
6. Type some text in the file name field (123) and press Ok
the Destination value now equals "/home/benderamp/Desktop/123"
I think file destination picker behavior can be changed in 2 ways: 1. Make it pure directory choose dialog - Ok button would always open current directory, no filename value should be required - the original file name would always be used for target file 2. Duplicate konqueror's "rightclick/Save Link As..." context menu behavior. If I save link in this way, I receive file chooser dialog with "scoreninja.jar" value set to file name field by default - I can navigate to any directory and this value will remain the same (only the path would change), or I can change filename by hands or select some file (not directory) to replace. So, chosen destination in not directory, but path to concrete file. In this case, when I first open "New Download" dialog, the destination value would be not just "/home/benderamp", but "/home/benderamp/scoreninja.jar" *** Bug 204096 has been marked as a duplicate of this bug. *** *** Bug 208072 has been marked as a duplicate of this bug. *** Ok, KGet should have the behaviour as described in your last comment in KDE 4.4... Lukas |