diff --git a/conda/clean-betas.py b/conda/clean-betas.py
index 00ff553d44555ded0a273c9a13290b7e6ef98532..5c3559fa0a564f792d1e9ee36cc46ad78b34f7bc 100755
--- a/conda/clean-betas.py
+++ b/conda/clean-betas.py
@@ -79,12 +79,13 @@ def main(scandir, dry_run):
       # got a beta package since it matches our regex, insert it into our
       # list of packages to evaluate
       name = os.path.basename(path) + '-' + m.group('name')
+      target = os.path.join(path, f)
       if m.group('python') is not None: name += '-' + m.group('python')
       betas.setdefault(name, []).append((
         StrictVersion(m.group('version')), #version
         int(m.group('build')), #build number
-        os.path.getmtime(path), #cross-platform last modification time
-        os.path.join(path, f),
+        os.path.getmtime(target), #cross-platform last modification time
+        target,
         ))
 
   count = sum([len(k) for k in betas.values()]) - len(betas)