diff --git a/src/core.h b/src/core.h index 0d7634b..36aa24b 100644 --- a/src/core.h +++ b/src/core.h @@ -15,7 +15,7 @@ #include #include -static const int VERSION_MAIN = 2; +static const int VERSION_MAIN = 1; static const int VERSION_SUB = 0; static const int VERSION_PATCH = 0; diff --git a/src/ls.c b/src/ls.c index 7e4bca0..b13abad 100755 --- a/src/ls.c +++ b/src/ls.c @@ -298,9 +298,12 @@ static int _get_stats( const char * path, stat_info_t * stats ) if( stats->lnk_jumps == 1 ) strcpy( stats->lnk_loc, buf ); char jump_dir[ MAX_STR_LEN ]; - strcpy( jump_dir, dirname( buf ) ); + char tmpbuf[ 2048 ]; + strcpy( tmpbuf, buf ); // because dirname and basename change their arguments + strcpy( jump_dir, dirname( tmpbuf ) ); char jump_file[ MAX_STR_LEN ]; - strcpy( jump_file, basename( buf ) ); + strcpy( tmpbuf, buf ); + strcpy( jump_file, basename( tmpbuf ) ); int cd_res = chdir( jump_dir ); if( cd_res != 0 ) goto dead_link; int res = get_stats( jump_file, stats );