diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-04-05 17:27:12 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-04-05 17:27:12 +0100 |
commit | 45def843209bed1bcebfde31938b6a009b363f33 (patch) | |
tree | 3fa00bfc8f41a911ab98402a5f13c37de580dbda | |
parent | b6fc09fd2c7eb51ba1823f8f6a0ed1d00b116ca2 (diff) | |
download | obnam-45def843209bed1bcebfde31938b6a009b363f33.tar.gz |
Correctly test for files that are written directly to repository root.
-rw-r--r-- | obnamlib/repo.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/obnamlib/repo.py b/obnamlib/repo.py index 9e60d1e5..4fef040f 100644 --- a/obnamlib/repo.py +++ b/obnamlib/repo.py @@ -143,7 +143,7 @@ class HookedFS(object): def _get_toplevel(self, filename): parts = filename.split(os.sep) - if parts: + if len(parts) > 1: return parts[0] else: # pragma: no cover raise obnamlib.Error('File at repository root: %s' % filename) |