summaryrefslogtreecommitdiff
path: root/doc/classes/OS.xml
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2020-04-28 19:25:02 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2020-04-28 19:37:09 +0200
commitd46e411b4475ffd5cc6871b5e5dc70150d930164 (patch)
treeda318ac5a5e81ecf3ad991af24c3884000e3f8f7 /doc/classes/OS.xml
parentabf5132a32bec9d80ce711b22476170fd18edfdc (diff)
Warn when trying to open `res://` or `user://` with `OS.shell_open()`
`OS.shell_open()` will pass on the path directly to the OS' shell handler (which can handle file paths or URLs). It can't handle Godot-specific paths, so these need to be converted with `ProjectSettings.globalize_path()` first.
Diffstat (limited to 'doc/classes/OS.xml')
-rw-r--r--doc/classes/OS.xml1
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index db79ee7765..6a70297f40 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -484,6 +484,7 @@
- [code]OS.shell_open("C:\\Users\name\Downloads")[/code] on Windows opens the file explorer at the user's Downloads folder.
- [code]OS.shell_open("https://godotengine.org")[/code] opens the default web browser on the official Godot website.
- [code]OS.shell_open("mailto:example@example.com")[/code] opens the default email client with the "To" field set to [code]example@example.com[/code]. See [url=https://blog.escapecreative.com/customizing-mailto-links/]Customizing [code]mailto:[/code] Links[/url] for a list of fields that can be added.
+ Use [method ProjectSettings.globalize_path] to convert a [code]res://[/code] or [code]user://[/code] path into a system path for use with this method.
[b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows.
</description>
</method>