Fossil

Check-in [b3fc0a13]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Oops, missed one thing in the previous check-in.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | symlinks
Files: files | file ages | folders
SHA1:b3fc0a133c50cf710b56a9556e00187d0058edd6
User & Date: mistachkin 2017-02-13 21:03:22
Context
2017-02-13
23:56
Add the 'test-file-environment' test command. check-in: c891d86c user: mistachkin tags: symlinks
21:03
Oops, missed one thing in the previous check-in. check-in: b3fc0a13 user: mistachkin tags: symlinks
21:01
For the '--no-dir-symlinks' flag to be honored when the 'allow-symlinks' setting is disabled, the file_wd_isdir() function must force lstat() to be used. check-in: 6c90761b user: mistachkin tags: symlinks
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/file.c.

92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
  struct fossilStat *buf, /* pointer to buffer where info should go. */
  int isWd,               /* non-zero to consider look at symlink itself. */
  int forceWd             /* non-zero to force look at symlink itself. */
){
  int rc;
  void *zMbcs = fossil_utf8_to_path(zFilename, 0);
#if !defined(_WIN32)
  if( isWd && db_allow_symlinks(0) ){
    rc = lstat(zMbcs, buf);
  }else{
    rc = stat(zMbcs, buf);
  }
#else
  rc = win32_stat(zMbcs, buf, isWd);
#endif







|







92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
  struct fossilStat *buf, /* pointer to buffer where info should go. */
  int isWd,               /* non-zero to consider look at symlink itself. */
  int forceWd             /* non-zero to force look at symlink itself. */
){
  int rc;
  void *zMbcs = fossil_utf8_to_path(zFilename, 0);
#if !defined(_WIN32)
  if( isWd && (forceWd || db_allow_symlinks(0)) ){
    rc = lstat(zMbcs, buf);
  }else{
    rc = stat(zMbcs, buf);
  }
#else
  rc = win32_stat(zMbcs, buf, isWd);
#endif