@@ -239,9 +239,9 @@ public CommonParams(Map<String, String> paramsMap) throws Exception {
239239 case "copy" :
240240 case "move" :
241241 case "rename" :
242- if (!fromLine ) mapLine .put ("key" , entryParam .getValue ("key" , "" ));
242+ if (!fromLine ) mapLine .put ("key" , entryParam .getValue ("key" , entryParam . getParamsMap (). containsKey ( "key" ) ? "" : null ));
243243 indexMap .put ("toKey" , "toKey" );
244- mapLine .put ("toKey" , entryParam .getValue ("to-key" , "" ));
244+ mapLine .put ("toKey" , entryParam .getValue ("to-key" , entryParam . getParamsMap (). containsKey ( "to-key" ) ? "" : null ));
245245 break ;
246246 case "download" :
247247 case "fetch" :
@@ -305,13 +305,13 @@ public CommonParams(Map<String, String> paramsMap) throws Exception {
305305 setSaveSeparator ();
306306 break ;
307307 case "qupload" :
308- String key = entryParam .getValue ("key" , "" );
308+ String key = entryParam .getValue ("key" , entryParam . getParamsMap (). containsKey ( "key" ) ? "" : null );
309309 if (!fromLine ) mapLine .put ("key" , key );
310- String filepath = entryParam .getValue ("filepath" , "" );
310+ String filepath = entryParam .getValue ("filepath" , entryParam . getValue ( "path" , "" ) );
311311 if (!"" .equals (filepath )) {
312312 indexMap .put ("filepath" , "filepath" );
313313 mapLine .put ("filepath" , filepath );
314- } else if ("" .equals (key )) {
314+ } else if (key == null || "" .equals (key )) {
315315 throw new IOException ("filepath and key shouldn't all be empty, file must be found with them." );
316316 }
317317 break ;
@@ -1218,29 +1218,35 @@ private void setRetryTimes() throws IOException {
12181218 private void setSaveTotal () throws IOException {
12191219 String saveTotal = entryParam .getValue ("save-total" , "" ).trim ();
12201220 if ("" .equals (saveTotal )) {
1221- if (isStorageSource ) {
1222- saveTotal = "true" ;
1223- //(2)云存储数据源时如果无 process 则为 true,如果存在 process 但不包含 filter 设置时为 false,既存在 process 同时包含 filter 设置时为 true。
1221+ if ((process != null && !"" .equals (process ))) {
1222+ this .saveTotal = "delete" .equals (process );
1223+ } else {
1224+ this .saveTotal = baseFilter == null && seniorFilter == null ;
1225+ }
1226+ // if (isStorageSource) {
1227+ // this.saveTotal = true;
1228+ //(2)云存储数据源时如果无 process 则 saveTotal 默认为 true,如果存在 process 则 saveTotal 默认为 false。
12241229// if (process == null || "".equals(process)) {
1225- // saveTotal = " true" ;
1230+ // this. saveTotal = true;
12261231// } else {
1227- // if (baseFilter != null || seniorFilter != null) saveTotal = " true" ;
1228- // else saveTotal = " false" ;
1232+ // if (baseFilter != null || seniorFilter != null) this. saveTotal = true;
1233+ // else this. saveTotal = false;
12291234// }
1230- } else {
1235+ // } else {
12311236// if (isSelfUpload) { // 自上传时将上传路径的路径等信息做下保存
1232- // saveTotal = " true" ;
1237+ // this. saveTotal = true;
12331238// }
12341239// else
1235- if ((process != null && !"" .equals (process )) || baseFilter != null || seniorFilter != null ) {
1236- saveTotal = "false" ;
1237- } else {
1238- saveTotal = "true" ;
1239- }
1240- }
1240+ // if ((process != null && !"".equals(process)) || baseFilter != null || seniorFilter != null) {
1241+ // this.saveTotal = false;
1242+ // } else {
1243+ // this.saveTotal = true;
1244+ // }
1245+ // }
1246+ } else {
1247+ ParamsUtils .checked (saveTotal , "save-total" , "(true|false)" );
1248+ this .saveTotal = Boolean .parseBoolean (saveTotal );
12411249 }
1242- ParamsUtils .checked (saveTotal , "save-total" , "(true|false)" );
1243- this .saveTotal = Boolean .parseBoolean (saveTotal );
12441250 }
12451251
12461252 private void setSavePath () throws IOException {
0 commit comments