This repository was archived by the owner on Mar 6, 2024. It is now read-only.
File tree 6 files changed +14
-9
lines changed
src/main/java/com/zhazhapan/qiniu
6 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 30
30
31
31
- 配置文件
32
32
33
- Windows使用路径:` C:/Program Files/Qiniu Tool `
33
+ Windows使用路径:` C:/ProgramData/QiniuTool `
34
34
35
35
MacOS 或 Linux 使用路径:` /tmp/qiniu/tool `
36
36
108
108
109
109
** 3. 其他**
110
110
111
- - [ ** 下载可执行的jar包** ] ( http://oq3iwfipo.bkt.clouddn.com/tools/zhazhapan/qiniu.jar " 七牛云——对象存储管理工具jar包下载地址 ")
111
+ - [ ** 下载可执行的jar包** ] ( http://oq3iwfipo.bkt.clouddn.com/tools/zhazhapan/qiniu.jar?v=1.0.2 " 七牛云——对象存储管理工具jar包下载地址 ")
112
112
113
113
- [ ** 历史版本** ] ( https://github.com/zhazhapan/qiniu/releases )
114
114
Original file line number Diff line number Diff line change @@ -89,7 +89,8 @@ public static void main(String[] args) {
89
89
} else {
90
90
workDir = Values .APP_PATH_OF_UNIX ;
91
91
}
92
- ConfigLoader .configPath = workDir + Values .CONFIG_PATH ;
92
+ ConfigLoader .configPath = workDir + Values .SEPARATOR + Values .CONFIG_PATH ;
93
+ logger .info ("current work director: " + workDir + ", config file: " + ConfigLoader .configPath );
93
94
mainWindow = new MainWindow ();
94
95
launch (args );
95
96
}
Original file line number Diff line number Diff line change 3
3
*/
4
4
package com .zhazhapan .qiniu .modules .constant ;
5
5
6
+ import java .io .File ;
7
+
6
8
/**
7
9
* @author pantao
8
10
*
@@ -15,11 +17,13 @@ public class Values {
15
17
16
18
public static final String INIT_APP_ERROR_HEADER = "初始化错误,无法继续运行" ;
17
19
18
- public static final String APP_PATH_OF_WINDOWS = "C:/Program Files/Qiniu Tool " ;
20
+ public static final String APP_PATH_OF_WINDOWS = "C:\\ ProgramData \\ QiniuTool " ;
19
21
20
22
public static final String APP_PATH_OF_UNIX = "/tmp/qiniu/tool" ;
21
23
22
- public static final String CONFIG_PATH = "/config.json" ;
24
+ public static final String SEPARATOR = File .separator ;
25
+
26
+ public static final String CONFIG_PATH = "config.json" ;
23
27
24
28
public static final String FORMAT_JSON_ERROR = "将字符串格式化为JSON失败" ;
25
29
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ public boolean showInputKeyDialog() {
145
145
Platform .runLater (() -> ak .requestFocus ());
146
146
147
147
Optional <String []> result = dialog .showAndWait ();
148
- if (result .isPresent ()) {
148
+ if (result .isPresent () && Checker . isNotEmpty ( ak . getText ()) && Checker . isNotEmpty ( sk . getText ()) ) {
149
149
ConfigLoader .writeKey (ak .getText (), sk .getText ());
150
150
return true ;
151
151
}
Original file line number Diff line number Diff line change 248
248
<children >
249
249
<VBox prefHeight =" 520.0" prefWidth =" 593.0" GridPane.columnIndex=" 1" GridPane.rowIndex=" 1" GridPane.rowSpan=" 2" >
250
250
<children >
251
- <Label text =" 当前版本: v1.0.1 " >
251
+ <Label text =" 当前版本: v1.0.2 " >
252
252
<font >
253
253
<Font size =" 20.0" />
254
254
</font >
Original file line number Diff line number Diff line change @@ -62,14 +62,14 @@ public void init() {
62
62
// 将上传日志写入磁盘
63
63
String content = MainWindowController .getInstance ().uploadStatusTextArea .getText ();
64
64
if (Checker .isNotEmpty (content )) {
65
- String logPath = QiniuApplication .workDir + "/ upload_"
65
+ String logPath = QiniuApplication .workDir + Values . SEPARATOR + " upload_"
66
66
+ Formatter .dateToString (new Date ()).replaceAll ("-" , "_" ) + ".log" ;
67
67
new FileExecutor ().saveFile (logPath , content , true );
68
68
}
69
69
// 将删除记录写入磁盘
70
70
String deleteContent = QiniuApplication .deleteLog .toString ();
71
71
if (Checker .isNotEmpty (deleteContent )) {
72
- String logPath = QiniuApplication .workDir + "/ delete_"
72
+ String logPath = QiniuApplication .workDir + Values . SEPARATOR + " delete_"
73
73
+ Formatter .dateToString (new Date ()).replaceAll ("-" , "_" ) + ".log" ;
74
74
new FileExecutor ().saveFile (logPath , deleteContent , true );
75
75
}
You can’t perform that action at this time.
0 commit comments