xbps-dgraph: only set rootdir it was set (fix #33).
This commit is contained in:
parent
2bb915c9d5
commit
878d2bf7e2
3
NEWS
3
NEWS
@ -1,5 +1,8 @@
|
||||
xbps-0.33 (???):
|
||||
|
||||
* xbps-dgraph: fixed a segfault if rootdir wasn't set:
|
||||
issue #33: https://github.com/voidlinux/xbps/issues/33
|
||||
|
||||
* xbps-uhelper now supports downloading files with a defined destination.
|
||||
The syntax of fetch is "URI>FILENAME". So if you call
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2010-2013 Juan Romero Pardines.
|
||||
* Copyright (c) 2010-2014 Juan Romero Pardines.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -479,7 +479,9 @@ main(int argc, char **argv)
|
||||
|
||||
/* Initialize libxbps */
|
||||
memset(&xh, 0, sizeof(xh));
|
||||
strncpy(xh.rootdir, rootdir, sizeof(xh.rootdir));
|
||||
if (rootdir != NULL)
|
||||
strncpy(xh.rootdir, rootdir, sizeof(xh.rootdir));
|
||||
|
||||
if ((rv = xbps_init(&xh)) != 0)
|
||||
die("failed to initialize libxbps: %s", strerror(rv));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user