misc tweaks and fixes

Now paying attention to the IPFS_PATH environment variable to determine
where the repository is. Fixed some broken tests. Fixed a bug whereby a
subdirectory within a subdirectory was not displaying correctly when
imported.
This commit is contained in:
jmjatlanta 2017-01-01 23:48:09 -05:00
parent e1582544b1
commit 61d0adc445
12 changed files with 168 additions and 76 deletions

View file

@ -6,11 +6,15 @@
/**
* Creates a node based on an incoming file
* @param file_name the file to import
* @param root the root directory
* @param file_name the file to import (could contain a directory)
* @param node the root node (could have links to others)
* @param fs_repo the repo to use
* @param bytes_written the number of bytes written to disk
* @param recursive true(1) if you want to include files and directories
* @returns true(1) on success
*/
int ipfs_import_file(const char* root, const char* fileName, struct Node** node, struct FSRepo* fs_repo, size_t* bytes_written);
int ipfs_import_file(const char* root, const char* fileName, struct Node** node, struct FSRepo* fs_repo, size_t* bytes_written, int recursive);
/**
* called from the command line

View file

@ -46,7 +46,7 @@ int os_utils_split_filename(const char* in, char** path, char** filename);
* @returns the results
*/
char* os_utils_getenv(const char* variable);
int os_utils_setenv(const char* variable, const char* value, int overwrite);
/**
* get the user's home directory
* @returns the user's home directory