Fossil

Check-in [90c03442]
Login

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

Overview
Comment:Avoid panic on opening a repository lacking .fossil-settings/allow-symlinks or .fossil-settings/allow-symlinks.no-warn . Probably want to reconsider the way historical_version_of_file() handles error codes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | andygoth-versioned-open
Files: files | file ages | folders
SHA1: 90c03442758222be52cb72f52f3d51a4a17cc10b
User & Date: andygoth 2015-05-02 20:54:53
Context
2015-05-15
01:41
Integrate andygoth-versioned-open. This makes [fossil open] respect ".fossil-settings/allow-symlinks". check-in: 010451e7 user: andygoth tags: trunk
2015-05-02
20:54
Avoid panic on opening a repository lacking .fossil-settings/allow-symlinks or .fossil-settings/allow-symlinks.no-warn . Probably want to reconsider the way historical_version_of_file() handles error codes. Closed-Leaf check-in: 90c03442 user: andygoth tags: andygoth-versioned-open
20:52
Correct comment describing behavior of errCode. check-in: 1b01c1ad user: andygoth tags: andygoth-versioned-open
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/db.c.

1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
    blob_zero(&setting);
    blob_appendf(&versionedPathname, "%s.fossil-settings/%s",
                 g.zLocalRoot, zName);
    if( !g.localOpen ){
      Blob noWarnFile;
      if( historical_version_of_file(g.zOpenRevision,
                                     blob_str(&versionedPathname),
                                     &setting, 0, 0, 0, -1)>0 ){
        found = 1;
      }
      /* See if there's a no-warn flag */
      blob_append(&versionedPathname, ".no-warn", -1);
      blob_zero(&noWarnFile);
      if( historical_version_of_file(g.zOpenRevision,
                                     blob_str(&versionedPathname),
                                     &noWarnFile, 0, 0, 0, -1)>0 ){
        noWarn = 1;
      }
      blob_reset(&noWarnFile);
    }else if( file_size(blob_str(&versionedPathname))>=0 ){
      /* File exists, and contains the value for this setting. Load from
      ** the file. */
      if( blob_read_from_file(&setting, blob_str(&versionedPathname))>=0 ){







|







|







1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
    blob_zero(&setting);
    blob_appendf(&versionedPathname, "%s.fossil-settings/%s",
                 g.zLocalRoot, zName);
    if( !g.localOpen ){
      Blob noWarnFile;
      if( historical_version_of_file(g.zOpenRevision,
                                     blob_str(&versionedPathname),
                                     &setting, 0, 0, 0, 2)!=2 ){
        found = 1;
      }
      /* See if there's a no-warn flag */
      blob_append(&versionedPathname, ".no-warn", -1);
      blob_zero(&noWarnFile);
      if( historical_version_of_file(g.zOpenRevision,
                                     blob_str(&versionedPathname),
                                     &noWarnFile, 0, 0, 0, 2)!=2 ){
        noWarn = 1;
      }
      blob_reset(&noWarnFile);
    }else if( file_size(blob_str(&versionedPathname))>=0 ){
      /* File exists, and contains the value for this setting. Load from
      ** the file. */
      if( blob_read_from_file(&setting, blob_str(&versionedPathname))>=0 ){