Skip to content

Commit 8f058c0

Browse files
committed
Bugfix in EosPath.as_posix()
1 parent 3c8f2a4 commit 8f058c0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

xaux/fs/eos.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ def mkdir(self, *args, **kwargs):
200200
def rmdir(self, *args, **kwargs):
201201
return _eos_rmdir(self.expanduser(), *args, **kwargs)
202202

203+
def as_posix(self, *args, **kwargs):
204+
if hasattr(self, 'eos_path'):
205+
return self.eos_path
206+
return Path.as_posix(self, *args, **kwargs)
207+
203208
# def glob(self, *args, **kwargs):
204209
# raise NotImplementedError
205210

@@ -220,9 +225,6 @@ def rmtree(self, *args, **kwargs):
220225
def size(self, *args, **kwargs):
221226
return _eos_size(self.expanduser(), FsPath, *args, **kwargs)
222227

223-
def as_posix(self, *args, **kwargs):
224-
return self.eos_path
225-
226228

227229
class EosPosixPath(EosPath, PurePosixPath):
228230
"""EosPath subclass for EOS paths on non-Windows systems.

0 commit comments

Comments
 (0)