Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* Fixed ndata detection with beta releases.

  • Loading branch information...
commit 59955c804dcaac2ad7cb9712ad6e1af94b4a31e8 1 parent f2d0000
@bobbens bobbens authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/ndata.c
View
9 src/ndata.c
@@ -118,11 +118,20 @@ static int ndata_openPackfile (void)
*/
if (ndata_filename == NULL) {
/* Check ndata with version appended. */
+#if VREV < 0
+ if (nfile_fileExists("%s-%d.%d.0-beta%d", NDATA_FILENAME,
+ VMAJOR, VMINOR, ABS(VREV) )) {
+ ndata_filename = malloc(PATH_MAX);
+ snprintf( ndata_filename, PATH_MAX, "%s-%d.%d.0-beta%d",
+ NDATA_FILENAME, VMAJOR, VMINOR, ABS(VREV) );
+ }
+#else /* VREV < 0 */
if (nfile_fileExists("%s-%d.%d.%d", NDATA_FILENAME, VMAJOR, VMINOR, VREV )) {
ndata_filename = malloc(PATH_MAX);
snprintf( ndata_filename, PATH_MAX, "%s-%d.%d.%d",
NDATA_FILENAME, VMAJOR, VMINOR, VREV );
}
+#endif /* VREV < 0 */
/* Check default ndata. */
else if (nfile_fileExists(NDATA_DEF))
ndata_filename = strdup(NDATA_DEF);
Please sign in to comment.
Something went wrong with that request. Please try again.