Skip to content

Commit

Permalink
Fix another use of os.path.join()
Browse files Browse the repository at this point in the history
All paths in RIME filesystems use forward slashes, so, when building pathnames, either join path components manually or use posixpath.join().
  • Loading branch information
Nicholas FitzRoy-Dale committed Jun 24, 2024
1 parent 127bcb0 commit ca2df8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rime/filesystem/fslibfilesystem.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import posixpath

from .ensuredir import ensuredir
from . import metadata
Expand Down Expand Up @@ -38,7 +39,7 @@ def stat(self, pathname):
return os.stat(self._fs.getsyspath(pathname))

def scandir(self, path):
pathnames = [os.path.join(path, name) for name in self._fs.listdir(path)]
pathnames = [posixpath.join(path, name) for name in self._fs.listdir(path)]

return metadata.get_dir_entries_and_update_db(self, self.metadata, pathnames)

Expand Down

0 comments on commit ca2df8b

Please sign in to comment.