Fossil

Check-in [f1173da7d5]
Login

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

Overview
Comment:Allow up to two // characters at the beginning of a pathname since this is important on windows.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f1173da7d51859103f1de0c89b261daa81aa8483
User & Date: drh 2011-03-18 02:13:28.019
Context
2011-03-18
02:51
When a server is pointing to a directory, allow *.fossil files to be served out of any subdirectory of that directory. For security, pathnames may not contain any characters except alphanumerics, "/", "-", and "_". check-in: d04fa1e143 user: drh tags: trunk
02:13
Allow up to two // characters at the beginning of a pathname since this is important on windows. check-in: f1173da7d5 user: drh tags: trunk
2011-03-17
17:20
Add a link to the OpenSuSE RPMs on the download page. check-in: 7e995f54ff user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/file.c.
297
298
299
300
301
302
303
304

305
306
307
308
309
310
311
312
    if( z[i]=='\\' ) z[i] = '/';
  }
#endif

  /* Removing trailing "/" characters */
  while( n>1 && z[n-1]=='/' ){ n--; }

  /* Remove duplicate '/' characters */

  for(i=j=0; i<n; i++){
    z[j++] = z[i];
    while( z[i]=='/' && i<n-1 && z[i+1]=='/' ) i++;
  }
  n = j;

  /* Skip over zero or more initial "./" sequences */
  for(i=0; i<n-1 && z[i]=='.' && z[i+1]=='/'; i+=2){}







|
>
|







297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
    if( z[i]=='\\' ) z[i] = '/';
  }
#endif

  /* Removing trailing "/" characters */
  while( n>1 && z[n-1]=='/' ){ n--; }

  /* Remove duplicate '/' characters.  Except, two // at the beginning
  ** of a pathname is allowed since this is important on windows. */
  for(i=j=1; i<n; i++){
    z[j++] = z[i];
    while( z[i]=='/' && i<n-1 && z[i+1]=='/' ) i++;
  }
  n = j;

  /* Skip over zero or more initial "./" sequences */
  for(i=0; i<n-1 && z[i]=='.' && z[i+1]=='/'; i+=2){}