Skip to content

Commit e375e05

Browse files
committed
Send relative path instead of full path when using >>> include
1 parent 430966f commit e375e05

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

py/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ def make_text_file_message(path):
144144
try:
145145
with open(path, 'r') as file:
146146
file_content = file.read().strip()
147+
path = os.path.relpath(path)
147148
return { 'type': 'text', 'text': f'==> {path} <==\n' + file_content.strip() }
148149
except UnicodeDecodeError:
149150
return { 'type': 'text', 'text': f'==> {path} <==\nBinary file, cannot display' }

0 commit comments

Comments
 (0)