Opened 14 years ago
Closed 13 years ago
#6733 closed defect (fixed)
[patch] File Open dialog incorrectly accepts folder selection
| Reported by: | Don-vip | Owned by: | team |
|---|---|---|---|
| Priority: | trivial | Milestone: | |
| Component: | Core | Version: | latest |
| Keywords: | JFileChooser | Cc: |
Description (last modified by )
The JOSM "File, Open" dialog accepts a folder as selected object(s) whereas only files are processed.
This prevents for example to paste a folder path in its file name text area in order to quickly display a folder's contents before selecting a specific file. Instead, the folder is selected by the JFileChooser and JOSM tries to read the folder contents.
Please find attached the patch.
Attachments (1)
Change History (9)
by , 14 years ago
| Attachment: | patch.diff added |
|---|
comment:1 by , 14 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
comment:2 by , 14 years ago
It should probably also open all other files it finds in the folder, but this is a different issue.
comment:3 by , 14 years ago
I thought so also before, but whereas a lot of images is normal, e.g. loading a lot off GPX files surely kills josm, so I think current method is better :-)
comment:4 by , 14 years ago
Could it be at least an internal property ? I don't care about this images autoloading, I personally select them all when I want to load all of them... But I definitely want to paste a folder's path in the text input field in order to display its contents without having to reach it by clicking all the way through the explorer :( It's really a non conventional usage to allow folder selection when you want to open files, I find this behaviour very disturbing.
comment:5 by , 13 years ago
| Description: | modified (diff) |
|---|---|
| Resolution: | wontfix |
| Status: | closed → reopened |
reopening so this is not forgotten :)
if the entered text in the address/location field is a directory, josm should first display it's contents.
ability to open all files in a directory should be provided by selecting that directory in the file listing, then specifically 'opening' it.
reasoning :
- all other software does it that way :)
- usecase : i have directory where i store gps traces and images. so occasionally i want to quickly get to that location to open one gps trace. i enter the path, hit 'enter'... and josm tries to open some 20gb of images.
comment:6 by , 13 years ago
I found that using Ctrl+Enter instead of Enter does the trick (opening pasted folder for further selection, versus accepting that folder and searching for images within it).
I'm not sure if this works on all platforms though.
Identification: JOSM/1.5 (5405 SVN en) Java version: 1.7.0_05, Oracle Corporation, Java HotSpot(TM) Client VM Operating system: Windows XP
comment:7 by , 13 years ago
When integrating the AgPifoJ, I wasn't too comfortable with this either. I thought, that some people might have problems with double click and select a folder and click "open" as a workaround. This wouldn't work of course. But since there were no complaints for months, I left it this way.
However, in addition to the usability problems described by Don-vip, I noticed, that many people don't know the photo-mapping feature in JOSM. Or they have heard of it, but they have no idea how to actually load their photos into JOSM.
So my suggestion:
- Apply the patch
- Add an additional menu entry
File > Import Photos..., that is the same asFile > Open..., but restricted to images, and with the current recursive folder opening feature.



The JOSM open file dialog accepts directories, as when a directory is selected it loads all images from it. This patch would destroy that feature.