summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouie <lshprung@yahoo.com>2020-07-10 16:05:28 -0700
committerlouie <lshprung@yahoo.com>2020-07-10 16:05:28 -0700
commit2ca6074cfcf99d89d665b7ebe3d2768c2adce2fe (patch)
tree81a21995cfb7ac16abb41e8b7f2f606c22a44bf0
parent6d054aeae011fd67d1f2650fe9cece8ee5f29455 (diff)
Fixed autoAlias bug
-rw-r--r--read_cfg.c7
-rw-r--r--read_cfg.obin9232 -> 9032 bytes
2 files changed, 4 insertions, 3 deletions
diff --git a/read_cfg.c b/read_cfg.c
index 84f3209..23d7af6 100644
--- a/read_cfg.c
+++ b/read_cfg.c
@@ -215,6 +215,7 @@ void handle_fname(char *path, char *group){
//check if autoAlias is on. If it is, go to the autoAlias function
if(hr){
+ printf("DEBUG: path = %s\n", relative_path_cpy);
strcpy(auto_name, autoAlias(relative_path_cpy));
new = create_entry(auto_name, relative_path_cpy);
}
@@ -255,9 +256,9 @@ char *autoAlias(char *path){
bool stop = false; //stop when you don't want to add a series of chars to the output
//get to the relative path name
- if(compmode) rpath = strrchr(path, '\\');
- else rpath = strrchr(path, '/');
- rpath++;
+ rpath = strrchr(path, '/');
+ if(rpath == NULL) rpath = path;
+ else rpath++;
while(*rpath != '\0'){
switch(*rpath){
diff --git a/read_cfg.o b/read_cfg.o
index 7df2803..c9e2dfc 100644
--- a/read_cfg.o
+++ b/read_cfg.o
Binary files differ