mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-12-22 07:01:55 +00:00
Accept relative paths in the IdeHandler API's "filename" key
This commit is contained in:
parent
66c9c5a592
commit
620212f00f
@ -76,7 +76,9 @@ class IdeHandler:
|
||||
if 'patterns' in message:
|
||||
self.filemanager.patterns = message['patterns']
|
||||
try:
|
||||
message['filename'] = message.get('filename') or self.initial_file
|
||||
message['filename'] = self.filemanager.find_file(
|
||||
message.get('filename') or self.initial_file
|
||||
)
|
||||
message['content'] = self.filemanager.read_file(message['filename'])
|
||||
except (PermissionError, ValueError):
|
||||
message['content'] = 'You have no permission to open that file :('
|
||||
|
Loading…
Reference in New Issue
Block a user