depot/third_party/nixpkgs/pkgs/development/nim-packages/spryvm/nil.patch
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

21 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)