mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
improve data_reader_factory_create_reader
This commit is contained in:
parent
a5d9453474
commit
1b4b953f2e
@ -1,4 +1,6 @@
|
||||
# 最新动态
|
||||
2022/08/22
|
||||
* 完善 data\_reader\_factory\_create\_reader处理Windows的盘符(感谢ufbycd提供补丁)。
|
||||
|
||||
2022/08/20
|
||||
* 支持gauge_pointer的默认指针的宽度跟随控件宽度改变而改变(感谢智明提供补丁)
|
||||
|
@ -90,6 +90,10 @@ data_reader_t* data_reader_factory_create_reader(data_reader_factory_t* factory,
|
||||
if (p != NULL) {
|
||||
return_value_if_fail((p - url) < TK_NAME_LEN, NULL);
|
||||
tk_strncpy(protocol, url, p - url);
|
||||
if (tk_strlen(protocol) <= 1) {
|
||||
/*是Windows下的盘符(如 D:/a/b/c.txt)*/
|
||||
tk_strncpy(protocol, "file", 4);
|
||||
}
|
||||
} else {
|
||||
tk_strncpy(protocol, "file", 4);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user