X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmiracle%2Fmiracle_commands.c;h=178f7f94d962b46545de641e4b47a5b41c575e10;hb=982cce93f18192cdc05fbddcb209ac3950b64318;hp=4a23e439c2c6a7599f66e85efc62df4906667b03;hpb=9390e8b584f3f717f0a326893c0e37cf187a0a51;p=melted diff --git a/src/miracle/miracle_commands.c b/src/miracle/miracle_commands.c index 4a23e43..178f7f9 100644 --- a/src/miracle/miracle_commands.c +++ b/src/miracle/miracle_commands.c @@ -130,6 +130,7 @@ response_codes miracle_list_units( command_argument cmd_arg ) valerie_response_printf( cmd_arg->response, 1024, "U%d %02d %s %d\n", i, node, constructor, online ); } } + valerie_response_printf( cmd_arg->response, 1024, "\n" ); return error; } @@ -167,7 +168,7 @@ response_codes miracle_list_clips( command_argument cmd_arg ) { snprintf( fullname, 1023, "%s%s/%s", cmd_arg->root_dir, dir_name, de[i]->d_name ); if ( lstat( fullname, &info ) == 0 && - ( S_ISREG( info.st_mode ) || ( strstr( fullname, ".clip" ) && info.st_mode | S_IXUSR ) ) ) + ( S_ISREG( info.st_mode ) || S_ISLNK( info.st_mode ) || ( strstr( fullname, ".clip" ) && info.st_mode | S_IXUSR ) ) ) valerie_response_printf( cmd_arg->response, 1024, "\"%s\" %llu\n", de[i]->d_name, (unsigned long long) info.st_size ); free( de[ i ] ); } @@ -210,7 +211,7 @@ response_codes miracle_set_global_property( command_argument cmd_arg ) strncpy( cmd_arg->root_dir, value, 1023 ); /* add a trailing slash if needed */ - if ( cmd_arg->root_dir[ len - 1 ] != '/') + if ( len && cmd_arg->root_dir[ len - 1 ] != '/') { cmd_arg->root_dir[ len ] = '/'; cmd_arg->root_dir[ len + 1 ] = '\0';