fixed instance loading forget to append basepath.. other path fixes (windows)
[csRadar.git] / csRadar.c
index e3b5209a350dd48dad8fb199d5c58ed2849a931b..17f09a85b547e5434cfa1499471a8d55179eccf3 100644 (file)
--- a/csRadar.c
+++ b/csRadar.c
@@ -44,8 +44,6 @@ int main( int argc, char *argv[] )
                if( (arg = csr_opt_arg( 'o' )) )
                {
                        strcpy( api.output_path, arg );
-                       csr_path_winunix( api.output_path );
-                       
                        output_set = 1;
                }
                
@@ -151,17 +149,14 @@ int main( int argc, char *argv[] )
                        csr_stripext( api.output_path );
                }
                
-               char *base_name;
-               if( !(base_name = csr_findext( api.output_path, '/' ) ))
-               {
-                       base_name = api.output_path;
-               }
-               
-               strcpy( api.vmf_name, base_name );
+               strcpy( api.vmf_name, csr_filename( api.output_path ) );
+               strcpy( api.vmf_folder, api.output_path );
+               csr_downlvl( api.vmf_folder );
                
                log_info( "output_path: '%s'\n", api.output_path );
                log_info( "vmf_name: '%s'\n", api.vmf_name );
-
+               log_info( "vmf_folder: '%s'\n", api.vmf_folder );
+               
                api.map = vmf_init( api.strings[0].str );
                if( api.map )
                {