• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

密猟オンラインクライアントプログラム JAVAベース


Commit MetaInfo

Revision23 (tree)
Time2016-12-30 16:27:01
Authormanjihq

Log Message

設定ファイルの格納場所をユーザーディレクトリへ行うようにした

Change Summary

Incremental Difference

--- trunk/src/hunton/Hunt.java (revision 22)
+++ trunk/src/hunton/Hunt.java (revision 23)
@@ -865,8 +865,10 @@
865865 /* save connection parameters */
866866 public static void save() {
867867 try {
868+ String datapath = System.getProperty("user.home", ".");
868869 try (BufferedWriter ofile
869- = new BufferedWriter(new FileWriter("hunt_setup.def"))) { //NOI18N
870+ = new BufferedWriter(new FileWriter(datapath
871+ + "/hunt_setup.def"))) { //NOI18N
870872 ofile.write(HostName);
871873 ofile.newLine();
872874 ofile.write(Integer.toString(HostPort));
@@ -930,8 +932,10 @@
930932 messageViewBounds = null;
931933 listViewBounds = null;
932934 try {
935+ String datapath = System.getProperty("user.home", ".");
933936 try (BufferedReader ifile
934- = new BufferedReader(new FileReader("hunt_setup.def"))) { //NOI18N
937+ = new BufferedReader(new FileReader(datapath
938+ + "/hunt_setup.def"))) { //NOI18N
935939 String work;
936940 work = ifile.readLine();
937941 if (work != null) {