Ticket #44442

File Drag and Drop ignores "TransBin" flag

Date d'ouverture: 2022-04-22 23:58 Dernière mise à jour: 2022-12-22 08:08

Rapporteur:
(Anonyme)
Propriétaire:
Type:
État:
Atteints
Composant:
Priorité:
5 - moyen
Sévérité:
4
Résolution:
Fixed
Fichier:
Aucun
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

Détails

I pretty much exclusively send binary files through TeraTerm, so having it remember the "binary" setting for sending a file is very useful, but sadly it doesn't persist between restarts of the program.

when i check the "Binary" and "Do same Process next drop" checkbox in the "File Drag and Drop" dialog window and then click "Save setup..." the TransBin flag in the .ini file gets set to "on" and it works perfectly fine.

but when i then close and reopen the program it defaults both the "Binary" and "Do same Process next drop" checkbox back to "off". when i then click "Save setup..." (without touching any option after opening the program) it will update the "TransBin" flag back to "off".

so it seems like it's writting the flag to the .ini file correctly, but for some reason it's not reading the flag when you open the program (or when you click "Restore setup...").

and that's why i think it's a bug, because what's the point of writing to a flag if it never gets read?

Ticket History (3/18 Histories)

2022-04-22 23:58 Updated by: None
  • New Ticket "File Drag and Drop ignores "TransBin" flag" created
2022-04-23 00:47 Updated by: nmaya
Commentaire

Param->DropType, DlgData->Param->DoSameProcessNextDrop ともに、INIファイルからの読み込み・書き込みとはつながっていないようで、プログラムが生きている間だけ存在する設定値になっている。

cf. ttssh2-devel 3412 からのスレッド

2022-04-23 01:50 Updated by: None
Commentaire

Reply To nmaya

Param->DropType, DlgData->Param->DoSameProcessNextDrop ともに、INIファイルからの読み込み・書き込みとはつながっていないようで、プログラムが生きている間だけ存在する設定値になっている。 cf. ttssh2-devel 3412 からのスレッド

but then why does TransBin in the .ini file update when you manually change the setting in the running program and then do "Save setup..."?

plus the flag is described as "Binary flag for Send File (on/off)" in the .ini file, so what else could it be used for except that one binary option when sending a file?

2022-04-23 09:17 Updated by: nmaya
Commentaire

さらに動作を調べました。

  • File - Send file の Binary チェックボックス
    • TERATERM.INI の TransBin と連動している(R/W)
  • File Drag and Drop の Binary チェックボックス
    • TERATERM.INI の TransBin(ts.TransBin)は反映されない(R)
    • OK を押されたとき、ファイル送信関数に値を渡すために ts.TransBin を使っている
      		case DROP_TYPE_SEND_FILE:
      		case DROP_TYPE_SEND_FILE_BINARY:
      			if (SendVar==NULL && NewFileVar(&SendVar)) {
      				HelpId = HlpFileSend;
      				strncpy_s(SendVar->FullName, sizeof(SendVar->FullName), FileName,  _TRUNCATE);
      				SendVar->DirLen = 0;
      				ts.TransBin = DropType == DROP_TYPE_SEND_FILE ? 0 : 1;
      				FileSendStart();
      
      

構造体のメンバが更新されるので、保存すると TERATERM.INI の TransBin が変更される。(W)

File - Send file では Read/Write が対称になっているが、File Drag and Drop ダイアログでは Read/Write が非対称になっています。

現在リリースされているバージョンでは、この動作を回避することはできません。また、TERATERM.INIにFile Drag and Drop専用の設定項目はありません。

2022-04-24 01:15 Updated by: nmaya
Commentaire

Do same process, next drop(次のドロップ時、同じ処理を行う)

https://ttssh2.osdn.jp/manual/4/ja/usage/mouse.html

ダイアログの設定内容をメモリに記憶し、次にドロップされたときに利用(ダイアログが表示される場合には ダイアログの設定に反映、そうでなければユーザへ確認せずに同じ処理を)します。

ダイアログの設定内容のうち、次に利用される設定は、DropType(SCP/Send file/Send file(binary)/Pasete Filename)"と"DropTypePaste(Separator is Space/Separator is NewLIne)"のみ。

"メモリに記憶し"と書いてあるので区別はつくと思うが、TERATERM.INIに対応する設定項目は存在しない。

の2点をヘルプに書き加えてもよいと思う。

Binary

初回(DROP_TYPE_CANCELのとき?)に ts.TransBin を IDC_BINARY_CHECK に反映できれば、TERATERM.INI からの読み込みが反映される。

しかし Binary は単独のフラグではなく、DropType が別になっているので単純ではなさそう。

表示時:DropType(CANCEL/SCP/Send file/Send file(binary)/Pasete Filename)とts.TransBin(true/false)の組み合わせでダイアログ表示時の状態を決めなければならない。

記憶:BinaryをチェックしてPasete Filenameした場合は、"Do same process, next drop" しても覚えてくれない。

2022-04-27 01:17 Updated by: zmatsuo
Commentaire

I found problem. Please See next file (1.5M animated gif).

https://osdn.net/projects/ttssh2/storage/tmp/20220427_zmatsuo/44442.gif

Fixed problem r9893 .

2022-04-27 01:24 Updated by: zmatsuo
Commentaire

"ファイルの送信" 時に ts.TransBin を "バイナリ" に反映するようにしました。

r9893 の修正では、SSH接続時には("SCP"が選択され、"ファイルの送信" が選択されないため) 反映されません。 もう少し修正します。

2022-04-27 23:39 Updated by: zmatsuo
Commentaire

Fixed the behavior of the binary checkbox in the drop dialog (r9894).

Please check snapshot.

https://osdn.net/projects/ttssh2/storage/snapshot/snapshot-teraterm4-r9894-20220427-zmatsuo.zip

この修正でよさそうなら、 r9893,r9894 をtrunkにマージしようと思います。

2022-04-29 00:34 Updated by: zmatsuo
Commentaire

revise document (r9895).

And I deleted gif file (tmp/20220427_zmatsuo/44442.gif).

2022-04-29 12:59 Updated by: None
Commentaire

it seems to be working perfectly fine with that snapshot, thank you!

2022-04-29 22:38 Updated by: nmaya
Commentaire

r9895 での動作を見てみました。Do same process, next drop で記憶されるのは

  • 処理の種類「SCP/Send file/Paste Filename」
  • Send file の Binary フラグ(処理の種類がSend fileのときだけ)
  • Paste File name の Escape(処理の種類がPaste Filenameのときだけ)
  • Paste File name のセパレータ「Separator is Space/Separator is NewLine」

になっていませんか?

2022-05-01 00:40 Updated by: zmatsuo
Commentaire

SCPのdest(送信先)も記憶されるので、 説明は「すべて記憶されます」でいいのではないだろうか? と考えました。

でも、SCPの送信先は常に記憶されて、TERATERM.INI に保存することもできるんですね。

とすると、現在の動作に対称性がなくて気持ち悪い感じもしますが、 不具合修正できていて、使い勝手的には問題ない印象です。 trunkにマージして、後の改良はTera Term5で行いましょうか。

説明ですが、SCPのところを

SCP でファイルを送信します。
SSH2 接続の場合で、ドロップ内容がファイルだけのとき選択できます。
設定ファイル(TERATERM.INI)に設定項目(ScpSendDir)が存在し、保存することができます。

次のドロップ時、同じ処理を行う、のところを

設定ファイル(TERATERM.INI)に対応する設定項目は存在せず、保存はされません。
記憶される内容は次の通りです。
  • 処理の種類(SCP/Send file/Send file/Paste Filename)
  • Send fileの時、Binaryチェックボックス
  • Paste Filenameの時、Escapeチェックボックスと、セパレータ(Separator is Space/Separator is NewLine)

こんなふうでどうでしょうか?

2022-05-03 15:24 Updated by: nmaya
Commentaire

INI と連動するのは

  • SCP の dest
    • Do same process, next drop が on でも off でも、処理の種類がSCPのときだけ
  • Send File の Binary
    • Do same process, next drop が on で、処理の種類がPaste Filenameのときだけ

となります。

仕様がおかしく感じられることと、仕様(実装)とドキュメントが異なることは別問題と考えます。ドキュメントをどう書いたらいいか少し考えてみます。

2022-07-25 19:54 Updated by: nmaya
Commentaire

r10085 で動作とドキュメントを修正しました。

こんな感じの状態で、trunk にマージしてよいでしょうか?

マージ予定のコミット: r9893, r9894, r9895, r10085

2022-07-26 22:41 Updated by: zmatsuo
Commentaire

ありがとうございます。

マージよろしくお願いします。

2022-07-27 00:18 Updated by: nmaya
  • Résolution Update from Aucun to Fixed
Commentaire

r10093 でマージをコミットしました。

2022-08-27 01:00 Updated by: nmaya
Commentaire

ドキュメントを更新しました。

2022-12-22 08:08 Updated by: nmaya
  • État Update from Ouvert to Atteints

Attachment File List

No attachments

Modifier

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Connexion