From 651686cdfef62f452e9604301e09f36da08fa764 Mon Sep 17 00:00:00 2001 From: Araq Date: Mon, 1 Nov 2010 23:39:23 +0100 Subject: [PATCH] bugfix: dialogs.ChooseFilesToOpen --- lib/impure/dialogs.nim | 4 ++++ web/news.txt | 2 ++ 2 files changed, 6 insertions(+) diff --git a/lib/impure/dialogs.nim b/lib/impure/dialogs.nim index c0b0771773..348fe76a8e 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 af0ce1fbd4..21773a05cf 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