by
Changes to 2 files · Browse files at 350a863107ff Showing diff from parent 20e5bcf14e01 8c1d05232b74 Diff from another changeset...
@@ -16,3 +16,4 @@ b42ad74af55054c231fc2d1763c2e8e0f2c0f49e 0.7
a4a7861b92459c4049d09064707d96e54662e506 0.7.1
39d55a62a43e01e3382fe29319cd9ff7ce7626b2 0.7.2
+5215e780e9163cd7f2ce377692d7e719a6e82520 0.7.3
|
@@ -175,9 +175,17 @@ from win32com.shell import shell, shellcon
except ImportError:
return
+ dirs = []
for path in paths:
abspath = os.path.abspath(path)
- pidl, ignore = shell.SHILCreateFromPath(abspath, 0)
+ if not os.path.isdir(abspath):
+ abspath = os.path.dirname(abspath)
+ if abspath not in dirs:
+ dirs.append(abspath)
+ # send notifications to deepest directories first
+ dirs.sort(lambda x, y: len(y) - len(x))
+ for dir in dirs:
+ pidl, ignore = shell.SHILCreateFromPath(dir, 0)
if pidl is None:
continue
shell.SHChangeNotify(shellcon.SHCNE_UPDATEITEM,
|
Loading...