Describe the bug 导入v2格式的配置信息,meta 中如果没有 desc 字段,会导致 desc 字段丢失。 Import the configuration information in V2 format. If there is no desc field in meta, the desc field will be lost.
Expected behavior 参考现有 appName字段,如果meta 中 appName = null,则不修改原有的 appName 字段。那么当 meta 中的 desc 字段为空时,是否也应当使用统一逻辑。type 字段由于是通过文件后缀初始化,暂时没有问题。 Refer to the existing appName field. If appName = null in the meta, the original appName field will not be modified. Then, when the desc field in the meta is empty, whether unified logic should also be used. Since the type field is initialized by the file suffix, no problem has been found.
Actually behavior v2格式导入meta 中appName = null,会清空 desc 字段。 when import with v2, In meta file, if appName is null, the desc field will be lost.
How to Reproduce
新建包含 归属应用,描述两个字段的配置 add new config ,and set the appName and desc fields.
导出v2 格式,并将上述配置 meta 文件中对应的 appName 及 desc 字段移除 export with v2 format, then remove appName and desc field in the meta file.
然后导入修改后的zip 包 then import the zip file.
此时发现 appName 没有变化,但是 desc 字段被清空了。 now ,we can find the appName field don't change, but the desc field has been blank.
Desktop (please complete the following information):
4条答案
按热度按时间fjaof16o1#
能否按照issue模版创建issue,否则好多信息都没有,比如版本之类的。
xurqigkl2#
Describe the bug
导入v2格式的配置信息,meta 中如果没有 desc 字段,会导致 desc 字段丢失。
Import the configuration information in V2 format. If there is no desc field in meta, the desc field will be lost.
Expected behavior
参考现有 appName字段,如果meta 中 appName = null,则不修改原有的 appName 字段。那么当 meta 中的 desc 字段为空时,是否也应当使用统一逻辑。type 字段由于是通过文件后缀初始化,暂时没有问题。
Refer to the existing appName field. If appName = null in the meta, the original appName field will not be modified. Then, when the desc field in the meta is empty, whether unified logic should also be used. Since the type field is initialized by the file suffix, no problem has been found.
Actually behavior
v2格式导入meta 中appName = null,会清空 desc 字段。
when import with v2, In meta file, if appName is null, the desc field will be lost.
How to Reproduce
add new config ,and set the appName and desc fields.
export with v2 format, then remove appName and desc field in the meta file.
then import the zip file.
now ,we can find the appName field don't change, but the desc field has been blank.
Desktop (please complete the following information):
Additional context
none
mwyxok5s3#
@moonciki 除了appName和desc之外,其他字段有没有受影响的?
pes8fvy94#
@moonciki 可以将你的commit提一下pr