From 68e60c137a791639174b3eb7848dbe381a28b0e1 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 16 Aug 2010 03:34:12 -0700 Subject: [PATCH] Handle OSError from os.path.samefile() (breakage from previous commit). --- pym/portage/dbapi/bintree.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index 2863b5c53..5d152452b 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -945,7 +945,11 @@ class binarytree(object): wantnewlockfile=1) if filename is not None: new_filename = self.getname(cpv) - if not os.path.samefile(filename, new_filename): + try: + samefile = os.path.samefile(filename, new_filename) + except OSError: + samefile = False + if not samefile: self._ensure_dir(os.path.dirname(new_filename)) _movefile(filename, new_filename, mysettings=self.settings) if self._all_directory and \ -- 2.26.2