diff --git a/DSView/pv/appcontrol.cpp b/DSView/pv/appcontrol.cpp index 25a18447..76737c65 100644 --- a/DSView/pv/appcontrol.cpp +++ b/DSView/pv/appcontrol.cpp @@ -73,7 +73,7 @@ bool AppControl::Init() qs = GetAppDataDir(); cs = pv::path::ToUnicodePath(qs); dsv_info("GetAppDataDir:\"%s\"", cs.c_str()); - cs = pv::path::ToUnicodePath(qs); + cs = pv::path::ConvertPath(qs); ds_set_user_data_dir(cs.c_str()); qs = GetFirmwareDir(); diff --git a/libsigrok4DSL/hardware/demo/demo.c b/libsigrok4DSL/hardware/demo/demo.c index 9d427bba..8ad499b7 100644 --- a/libsigrok4DSL/hardware/demo/demo.c +++ b/libsigrok4DSL/hardware/demo/demo.c @@ -28,7 +28,6 @@ #include #include #include - #include #include #ifdef _WIN32 @@ -410,7 +409,7 @@ static int get_pattern_mode_from_file(const char *sub_dir, struct demo_mode_patt strcpy(dir_path, DS_USR_PATH); strcat(dir_path,"/demo/"); strcat(dir_path, sub_dir); - + GDir *dir = NULL; dir = g_dir_open(dir_path,0,NULL); if(dir == NULL) @@ -437,7 +436,6 @@ static int get_pattern_mode_from_file(const char *sub_dir, struct demo_mode_patt } } } - g_dir_close(dir); info->count = num; @@ -2511,7 +2509,7 @@ static int load_virtual_device_session(struct sr_dev_inst *sdi) archive = unzOpen64(sdi->path); if (NULL == archive) { - sr_err("%s: Load zip file error.", __func__); + sr_err("%s: Load file error:\"%s\"", __func__, sdi->path); return SR_ERR; } if (unzLocateFile(archive, "header", 0) != UNZ_OK) @@ -2570,8 +2568,7 @@ static int load_virtual_device_session(struct sr_dev_inst *sdi) val = g_key_file_get_string(kf, sections[i], keys[j], NULL); if (!strcmp(keys[j], "version")) { - version = strtoull(val, NULL, 10); - sr_info("The 'header' file format version:%d", version); + version = strtoull(val, NULL, 10); } } }