Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85a26d5a authored by Tao Bao's avatar Tao Bao Committed by Android Git Automerger
Browse files

am dc48635b: am 1747e35a: am a0021026: Merge "fix up ota_from_target_files symlink detection."

* commit 'dc48635b':
  fix up ota_from_target_files symlink detection.
parents 553a9e92 dc48635b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -136,12 +136,12 @@ def MostPopularKey(d, default):
def IsSymlink(info):
  """Return true if the zipfile.ZipInfo object passed in represents a
  symlink."""
  return (info.external_attr >> 16) == 0o120777
  return (info.external_attr >> 16) & 0o770000 == 0o120000

def IsRegular(info):
  """Return true if the zipfile.ZipInfo object passed in represents a
  symlink."""
  return (info.external_attr >> 28) == 0o10
  regular file."""
  return (info.external_attr >> 16) & 0o770000 == 0o100000

def ClosestFileMatch(src, tgtfiles, existing):
  """Returns the closest file match between a source file and list