bardsoftware / ganttproject

Official GanttProject repository.
http://ganttproject.biz
GNU General Public License v3.0
841 stars 303 forks source link

Export output file chooser misbehavior #476

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
- Open a project (HouseBuildingSample for example);
- Go to Project->Export
- Choose an extension (png, pdf or whatelse) and press ok
- The default directory for me is "C:\Program 
Files\GanttProject-2.5\HouseBuildingSample.pdf", press ok
- An error is displayed in the bottom right corner "Export failure. Failed 
subtask: Generating PDF". 
- There is a line in the log file : 
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: 
C:\Program Files\GanttProject-2.5\HouseBuildingSample.pdf (Access denied)
- If i repeat the process and try to modify the output file location to : 
C:\Users\...\Documents\doc.pdf, the error remains but something is strange: 
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: 
C:\Program Files\GanttProject-2.5\HouseBuildingSample.pdf (Access denied)
- The output file location is not the chosen one

What is the expected output? What do you see instead?
The project in pdf format or something else

What version of the product are you using? On what operating system?

GanttProject 2.5.1 Praha (build 1054)

OS: Windows Vista (may be the source of the problem)

Original issue reported on code.google.com by cherifmo...@gmail.com on 9 Apr 2012 at 11:15

GoogleCodeExporter commented 9 years ago
How do you change the output file? Type a file name in the text box or use the 
file chooser?

Original comment by dbarashev on 9 Apr 2012 at 11:31

GoogleCodeExporter commented 9 years ago
If i change the output file by using the file chooser the text box contains 
"C:\Program Files\GanttProject-2.5\HouseBuildingSample.pdf" (no changes) 
If i change the file name directly in the text box, i obtain the results 
described above. 

Original comment by cherifmo...@gmail.com on 10 Apr 2012 at 8:30

GoogleCodeExporter commented 9 years ago
Interesting. Both ways work for fine me, but I am testing on Linux. Will try on 
Windows a little bit later. Meanwhile, can you try choosing in the chooser some 
directory where you can write to, e.g. C:\TEMP or your home directory (not the 
file). GP should append a file name in this case automatically. If it doesn't 
work then try choosing a file (you can type a file name in the chooser window)

Original comment by dbarashev on 10 Apr 2012 at 8:41

GoogleCodeExporter commented 9 years ago
It works when i choose the following file location : 
C:\Windows\Temp\GanttProject Docs\document.pdf

Proposal: If the user chooses a location whose access is restricted, show an 
alert message that invite the user to choose another location or something else

Original comment by cherifmo...@gmail.com on 12 Apr 2012 at 8:38