summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xlib/impure/dialogs.nim4
-rwxr-xr-xweb/news.txt2
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/impure/dialogs.nim b/lib/impure/dialogs.nim
index c0b077177..348fe76a8 100755
--- a/lib/impure/dialogs.nim
+++ b/lib/impure/dialogs.nim
@@ -129,6 +129,10 @@ proc ChooseFilesToOpen*(window: PWindow, root: string = ""): seq[string] =
           inc(i)
           if buf[i] == '\0': break
         for i in 0..result.len-1: result[i] = os.joinPath(path, result[i])
+      else:
+        # only one file selected --> gosh, what an ungly thing 
+        # the windows API is
+        add(result, path) 
   else:
     var chooser = file_chooser_dialog_new("Open Files", window,
                 FILE_CHOOSER_ACTION_OPEN,
diff --git a/web/news.txt b/web/news.txt
index af0ce1fbd..21773a05c 100755
--- a/web/news.txt
+++ b/web/news.txt
@@ -11,6 +11,8 @@ Bugfixes
 - Bugfix: ``httpclient`` correct passes the path starting with ``/``.
 - Bugfixes for the ``htmlparser`` module.
 - Bugfix: ``pegs.find`` did not respect ``start`` parameter.
+- Bugfix: ``dialogs.ChooseFilesToOpen`` did not work if only one file is
+  selected.
 
 
 Additions