Fixed a bug identified by student Jon R - thank you!

This commit is contained in:
Edward Donner
2024-10-04 19:37:06 -04:00
parent f6bcc58585
commit 14f2667194
6 changed files with 1540 additions and 30 deletions

View File

@@ -97,7 +97,7 @@
"products = glob.glob(\"knowledge-base/products/*\")\n",
"\n",
"for product in products:\n",
" name = product.split('/')[-1][:-3]\n",
" name = product.split(os.sep)[-1][:-3]\n",
" doc = \"\"\n",
" with open(product, \"r\") as f:\n",
" doc = f.read()\n",