From: Ira W. Snyder Date: Mon, 8 Jan 2007 04:04:04 +0000 (-0800) Subject: [JOIN] Fix os.path.samefile() check for win32 X-Git-Tag: v2.0.0~4 X-Git-Url: https://www.irasnyder.com/gitweb/?a=commitdiff_plain;h=063e02e2f4395d547d548051d525c0e39f060baf;p=rarslave2.git [JOIN] Fix os.path.samefile() check for win32 The function os.path.samefile() doesn't exist on win32, so we will just check and see if the names are the same, that will be good enough to fix mv in this case. Signed-off-by: Ira W. Snyder --- diff --git a/PAR2Set/Join.py b/PAR2Set/Join.py index 34c4996..61a1c42 100644 --- a/PAR2Set/Join.py +++ b/PAR2Set/Join.py @@ -126,7 +126,9 @@ class Join (PAR2Set.Base.Base): NOEXTRACT_CMD = rsutil.common.config_get_value ('commands', 'noextract') # Make sure that both files are not the same file. If they are, don't run at all. - if os.path.samefile (file, os.path.join (todir, file)): + # NOTE: os.path.samefile() doesn't exist on win32, so we can't use it. + if rsutil.common.full_abspath (file) == \ + rsutil.common.full_abspath (os.path.join (todir, file)): return rsutil.common.SUCCESS cmd = NOEXTRACT_CMD % (file, todir)