diff options
author | jstebbins <[email protected]> | 2014-02-22 05:21:04 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2014-02-22 05:21:04 +0000 |
commit | 993d19bcffe30ae1213ebe040083a86b2c33300f (patch) | |
tree | 95a574db516d36610edb1fcbfd160d4e18351150 /libhb/ports.h | |
parent | ab50e34327aea45ed0a1b258d07bd269dcc39a9e (diff) |
libhb: clean up handling dir directory separator
title->name was getting set to an empty string in some cases due to
looking for the wrong directory separator.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6057 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/ports.h')
-rw-r--r-- | libhb/ports.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libhb/ports.h b/libhb/ports.h index f55cac8c9..771a233a7 100644 --- a/libhb/ports.h +++ b/libhb/ports.h @@ -12,10 +12,15 @@ #if defined(_WIN32) #define DIR_SEP_STR "\\" +#define DIR_SEP_CHAR '\\' +#define IS_DIR_SEP(c) (c == '\\' || c == '/') #else #define DIR_SEP_STR "/" +#define DIR_SEP_CHAR '/' +#define IS_DIR_SEP(c) (c == '/') #endif + /************************************************************************ * CPU info utilities ***********************************************************************/ @@ -66,10 +71,12 @@ typedef struct stat hb_stat_t; HB_DIR* hb_opendir(char *path); int hb_closedir(HB_DIR *dir); +void hb_rewinddir(HB_DIR *dir); struct dirent * hb_readdir(HB_DIR *dir); int hb_mkdir(char * name); int hb_stat(const char *path, hb_stat_t *sb); FILE * hb_fopen(const char *path, const char *mode); +char * hb_strr_dir_sep(const char *path); #ifdef __LIBHB__ |