Fossil

Check-in [f95e47b611]
Login

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

Overview
Comment:Fixed file_extension() to behave like its docs say it does, which would have made [5a9ac6ca3e] unnecessary.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f95e47b611ee591b426b6cac903696a0754c1458f645fd3a3497d0fb746494ec
User & Date: stephan 2020-08-16 16:49:54.334
Context
2020-08-16
17:18
Mention the "fossil backup" command in the 2.12 change log. check-in: a02bcb033b user: drh tags: trunk
16:49
Fixed file_extension() to behave like its docs say it does, which would have made [5a9ac6ca3e] unnecessary. check-in: f95e47b611 user: stephan tags: trunk
16:35
Fix the release version on the home page. check-in: 4c45033033 user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/file.c.
2398
2399
2400
2401
2402
2403
2404
2405


2406
2407
2408
2409
2410
  }else{
    fossil_print("Touched %d file(s)\n", changeCount);
  }
}

/*
** If zFileName is not NULL and contains a '.', this returns a pointer
** to the position after the final '.', else it returns NULL.


*/
const char * file_extension(const char *zFileName){
  const char * zExt = strrchr(zFileName, '.');
  return zExt ? &zExt[1] : 0;
}







|
>
>


|


2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
  }else{
    fossil_print("Touched %d file(s)\n", changeCount);
  }
}

/*
** If zFileName is not NULL and contains a '.', this returns a pointer
** to the position after the final '.', else it returns NULL. As a
** special case, if it ends with a period then a pointer to the
** terminating NUL byte is returned.
*/
const char * file_extension(const char *zFileName){
  const char * zExt = zFileName ? strrchr(zFileName, '.') : 0;
  return zExt ? &zExt[1] : 0;
}