mercurial/posix.py
changeset 44306 a0ec05d93c8e
parent 43506 9f70512ae2cf
child 44867 8e8fd938ca07
equal deleted inserted replaced
44305:d8d4fa9a7f18 44306:a0ec05d93c8e
   322                 try:
   322                 try:
   323                     fullpath = os.path.join(cachedir, target)
   323                     fullpath = os.path.join(cachedir, target)
   324                     open(fullpath, b'w').close()
   324                     open(fullpath, b'w').close()
   325                 except IOError as inst:
   325                 except IOError as inst:
   326                     if (
   326                     if (
   327                         inst[0]  # pytype: disable=unsupported-operands
   327                         inst[0] == errno.EACCES
   328                         == errno.EACCES
   328                     ):  # pytype: disable=unsupported-operands
   329                     ):
       
   330                         # If we can't write to cachedir, just pretend
   329                         # If we can't write to cachedir, just pretend
   331                         # that the fs is readonly and by association
   330                         # that the fs is readonly and by association
   332                         # that the fs won't support symlinks. This
   331                         # that the fs won't support symlinks. This
   333                         # seems like the least dangerous way to avoid
   332                         # seems like the least dangerous way to avoid
   334                         # data loss.
   333                         # data loss.