mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Fix for Bug #3534946
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1920 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
59665da813
commit
cdaf594cb3
1 changed files with 8 additions and 2 deletions
|
@ -52,8 +52,14 @@ namespace Greenshot.Forms {
|
|||
private void init() {
|
||||
saveFileDialog = new SaveFileDialog();
|
||||
applyFilterOptions();
|
||||
string initialDirectory = Path.GetDirectoryName(conf.OutputFileAsFullpath);
|
||||
if (conf.OutputFileAsFullpath != null && conf.OutputFileAsFullpath.Length > 0 && Directory.Exists(initialDirectory)) {
|
||||
string initialDirectory = null;
|
||||
try {
|
||||
initialDirectory = Path.GetDirectoryName(conf.OutputFileAsFullpath);
|
||||
} catch {
|
||||
LOG.WarnFormat("OutputFileAsFullpath was set to {0}, ignoring due to problem in path.", conf.OutputFileAsFullpath);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(initialDirectory) && Directory.Exists(initialDirectory)) {
|
||||
saveFileDialog.InitialDirectory = initialDirectory;
|
||||
} else if (Directory.Exists(conf.OutputFilePath)) {
|
||||
saveFileDialog.InitialDirectory = conf.OutputFilePath;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue