path: Fixed ErrPath error.
This commit is contained in:
parent
d6e92026a2
commit
d761e6062b
2 changed files with 15 additions and 10 deletions
|
@ -1,16 +1,20 @@
|
|||
#ifndef IPFS_PATH_H
|
||||
#define IPFS_PATH_H
|
||||
|
||||
char *ErrPath[] = {
|
||||
NULL,
|
||||
// ErrBadPath is returned when a given path is incorrectly formatted
|
||||
"invalid 'ipfs ref' path",
|
||||
// Paths after a protocol must contain at least one component
|
||||
"path must contain at least one component",
|
||||
"TODO: ErrCidDecode",
|
||||
NULL,
|
||||
"no link named %s under %s"
|
||||
};
|
||||
#ifdef IPFS_PATH_C
|
||||
char *ErrPath[] = {
|
||||
NULL,
|
||||
// ErrBadPath is returned when a given path is incorrectly formatted
|
||||
"invalid 'ipfs ref' path",
|
||||
// Paths after a protocol must contain at least one component
|
||||
"path must contain at least one component",
|
||||
"TODO: ErrCidDecode",
|
||||
NULL,
|
||||
"no link named %s under %s"
|
||||
};
|
||||
#else
|
||||
extern char **ErrPath;
|
||||
#endif // IPFS_PATH_C
|
||||
|
||||
enum {
|
||||
ErrBadPath = 1,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ipfs/cid/cid.h>
|
||||
#define IPFS_PATH_C
|
||||
#include <ipfs/path/path.h>
|
||||
|
||||
// FromCid safely converts a cid.Cid type to a Path type
|
||||
|
|
Loading…
Reference in a new issue