Mercurial > rinkhals
changeset 42:498e4732bc1f
Auto-convert unix / http path separators to platform appropriate ones -- we should now just be able to use slash as the path separator through-out our own code.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Mon, 31 Aug 2009 16:48:47 +0000 |
parents | 6055a8a8678d |
children | fb5be14ea930 |
files | gamelib/data.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/data.py Mon Aug 31 16:47:54 2009 +0000 +++ b/gamelib/data.py Mon Aug 31 16:48:47 2009 +0000 @@ -20,5 +20,7 @@ "mode" is passed as the second arg to open(). ''' + # convert unix path separator to platform appropriate one + filename = os.path.join(*filename.split("/")) return open(os.path.join(data_dir, filename), mode)