Explorar o código

remove unneeded sort from scandir_generic()

Alexander 'Leo' Bergolth %!s(int64=7) %!d(string=hai) anos
pai
achega
b5fbeed6ed
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/borg/helpers.py

+ 1 - 1
src/borg/helpers.py

@@ -2086,7 +2086,7 @@ class GenericDirEntry:
 
 def scandir_generic(path='.'):
     """Like os.listdir(), but yield DirEntry objects instead of returning a list of names."""
-    for name in sorted(os.listdir(path)):
+    for name in os.listdir(path):
         yield GenericDirEntry(path, name)