interesting. the code does not handle permission i...
# general
w
interesting. the code does not handle permission issues
Copy code
try:
    os.link(source, dest)
  except OSError as e:
    if e.errno == errno.EEXIST:
      # File already exists.  If overwrite=True, write otherwise skip.
      if overwrite:
        do_copy()
    elif e.errno == errno.EXDEV:
      # Hard link across devices, fall back on copying
      do_copy()
    else:
      raise