nixpkgs/pkgs/development/nim-packages/spryvm/nil.patch
Emery Hemingway f8e3247113 nimPackages.spry: init at 0.9.0
Includes new dependency packages:
- nimPackages.python:   1.2
- nimPackages.rocksdb:  0.2.0
- nimPackages.snappy:   0.1.0
- nimPackages.spryvm:   0.9.3
- nimPackages.stew:     0.1.0
- nimPackages.tempfile: 0.1.7
- nimPackages.ui:       0.9.4
2021-11-12 14:02:45 +01:00

22 lines
600 B
Diff

diff --git a/spryvm/spryui.nim b/spryvm/spryui.nim
index 37f5329..50440e9 100644
--- a/spryvm/spryui.nim
+++ b/spryvm/spryui.nim
@@ -140,14 +140,14 @@ proc addUI*(spry: Interpreter) =
nimMeth("openFile"):
var win = WindowNode(evalArgInfix(spry))
var path = openFile(Window(win.widget))
- if path.isNil:
+ if path == "":
spry.nilVal
else:
newValue($path)
nimMeth("saveFile"):
var win = WindowNode(evalArgInfix(spry))
var path = saveFile(Window(win.widget))
- if path.isNil:
+ if path == "":
spry.nilVal
else:
newValue($path)