home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.1.148 < prev    next >
Encoding:
Internet Message Format  |  2002-08-03  |  3.5 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.147 (extra)
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.1.148 (extra)
  11. Problem:    MS-Windows: ACL is not properly supported.
  12. Solution:   Add an access() replacement that also works for ACL. (Mike
  13.         Williams)
  14. Files:        runtime/doc/editing.txt, src/os_win32.c
  15.  
  16.  
  17. *** ../vim61.147/runtime/doc/editing.txt    Fri Mar 22 21:18:36 2002
  18. --- runtime/doc/editing.txt    Mon Jun 10 20:54:44 2002
  19. ***************
  20. *** 1102,1109 ****
  21.      Vim attempts to preserve the ACL info when writing a file.  The backup file
  22.   will get the ACL info of the original file.
  23.      The ACL info is also used to check if a file is read-only (when opening the
  24. ! file).  Not for MS-Windows though, because the ACL library functions are
  25. ! buggy.
  26.   
  27.                           *write-device*
  28.   When the file name is actually a device name, Vim will not make a backup (that
  29. --- 1102,1116 ----
  30.      Vim attempts to preserve the ACL info when writing a file.  The backup file
  31.   will get the ACL info of the original file.
  32.      The ACL info is also used to check if a file is read-only (when opening the
  33. ! file).
  34. !                         *read-only-share*
  35. ! When MS-Windows shares a drive on the network it can be marked as read-only.
  36. ! This means that even if the file read-only attribute is absent, and the ACL
  37. ! settings on NT network shared drives allow writing to the file, you can still
  38. ! not write to the file.  Vim on Win32 platforms will detect read-only network
  39. ! drives and will mark the file as read-only.  You will not be able to override
  40. ! it with |:write|.
  41.   
  42.                           *write-device*
  43.   When the file name is actually a device name, Vim will not make a backup (that
  44. *** ../vim61.147/src/os_win32.c    Wed May 15 22:00:04 2002
  45. --- src/os_win32.c    Sun Aug  4 20:50:41 2002
  46. ***************
  47. *** 4012,4024 ****
  48.   }
  49.   
  50.   /*
  51. !  * mch_access() was used to support ACLs under Windows NT/2K/XP(?).
  52. !  * Unfortunately the ACL system functions are buggy, we couldn't make it work,
  53. !  * removed for now.
  54.    * Returns 0 if file "n" has access rights according to "p", -1 otherwise.
  55.    */
  56.       int
  57.   mch_access(char *n, int p)
  58.   {
  59. !     return access(n, p);
  60.   }
  61. --- 4020,4042 ----
  62.   }
  63.   
  64.   /*
  65. !  * mch_access() extends access() to do more detailed check on network drives.
  66.    * Returns 0 if file "n" has access rights according to "p", -1 otherwise.
  67.    */
  68.       int
  69.   mch_access(char *n, int p)
  70.   {
  71. !     HANDLE  hFile;
  72. !     DWORD am;
  73. !     /* Trying to open the file for the required access does ACL, read-only
  74. !      * network share, and file attribute checks.
  75. !      */
  76. !     am = ((p & W_OK) ? GENERIC_WRITE : 0)
  77. !         | ((p & R_OK) ? GENERIC_READ : 0);
  78. !     hFile = CreateFile(n, am, 0, NULL, OPEN_EXISTING, 0, NULL);
  79. !     if (hFile == INVALID_HANDLE_VALUE)
  80. !         return -1;
  81. !     CloseHandle(hFile);
  82. !     return 0;
  83.   }
  84. *** ../vim61.147/src/version.c    Sun Aug  4 20:56:30 2002
  85. --- src/version.c    Sun Aug  4 21:00:31 2002
  86. ***************
  87. *** 608,609 ****
  88. --- 608,611 ----
  89.   {   /* Add new patch number below this line */
  90. + /**/
  91. +     148,
  92.   /**/
  93.  
  94. -- 
  95. From "know your smileys":
  96.  <|-) Chinese
  97.  <|-( Chinese and doesn't like these kind of jokes
  98.  
  99.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  100. ///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
  101. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  102.  \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
  103.