[meld] Make symlinks a set
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Make symlinks a set
- Date: Sat, 5 Feb 2011 22:54:44 +0000 (UTC)
commit e0e81bb91aecd0794b6e06e45b69c62e814fa817
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Dec 18 14:33:29 2010 +1000
Make symlinks a set
meld/dirdiff.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index d3e42ac..0761335 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -356,7 +356,7 @@ class DirDiff(melddoc.MeldDoc, gnomeglade.Component):
self.actiongroup.get_action("Hide").set_sensitive(False)
yield _("[%s] Scanning %s") % (self.label_text, "")
prefixlen = 1 + len( self.model.value_path( self.model.get_iter(rootpath), 0 ) )
- symlinks_followed = {} # only follow symlinks once
+ symlinks_followed = set()
todo = [ rootpath ]
expanded = set()
while len(todo):
@@ -433,8 +433,8 @@ class DirDiff(melddoc.MeldDoc, gnomeglade.Component):
if stat.S_ISLNK(s.st_mode):
if not self.prefs.ignore_symlinks:
key = (s.st_dev, s.st_ino)
- if symlinks_followed.get( key, 0 ) == 0:
- symlinks_followed[key] = 1
+ if key not in symlinks_followed:
+ symlinks_followed.add(key)
try:
s = os.stat(os.path.join(root, e))
except OSError, err:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]