diff options
-rw-r--r-- | linuxnamespaces/atlocation.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linuxnamespaces/atlocation.py b/linuxnamespaces/atlocation.py index 24c2cce..6aada55 100644 --- a/linuxnamespaces/atlocation.py +++ b/linuxnamespaces/atlocation.py @@ -505,7 +505,7 @@ class AtLocation: AtLocations referencing the same object as the dirpath though as an AT_EMPTY_PATH with temporary fd. """ - if self.flags != AtFlags.NONE: + if self.flags & ~AtFlags.AT_EMPTY_PATH != AtFlags.NONE: raise NotImplementedError( "walk is not supported for an AtLocation with flags" ) @@ -513,7 +513,7 @@ class AtLocation: if follow_symlinks: flags = AtFlags.NONE for dirpath, dirnames, filenames, dirfd in os.fwalk( - self.location, + "." if self.flags & AtFlags.AT_EMPTY_PATH else self.location, topdown=topdown, onerror=onerror, follow_symlinks=follow_symlinks, |