Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: "Ext. File Share Connector Impl" MoveFile uses "AFS File Client" RenameFile with parameters flipped

オープン 初心者向け
#13,401 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
領域
backend

調査の方向性

ExtFileShareConnectorImpl.Codeunit.al の MoveFile プロシージャから始め、AFS File Client Impl の RenameFile の宣言と実装を確認してください。issue では、ソース引数と宛先引数が入れ替わっていると指摘されています。RenameFile のパラメーター順と照らし合わせて呼び出しを確認してください。FolderA/ から FolderA/Archive/ へのファイル移動が成功し、移動元のファイルが移動先にあることを完了条件とします。

索引モデルが issue の本文から書いたものです。

説明

Team: Integrations
Describe the issue

The MoveFile procedure in codeunit 4570 "Ext. File Share Connector Impl" calls RenameFile on codeunit 8950 "AFS File Client" with SourceFilePath and DestinationFilePath swapped:

// ExtFileShareConnectorImpl.Codeunit.al, MoveFile
AFSOperationResponse := AFSFileClient.RenameFile(TargetPath, SourcePath);

RenameFile is declared as RenameFile(SourceFilePath: Text; DestinationFilePath: Text). Its implementation in "AFS File Client Impl." puts the first parameter in the x-ms-file-rename-source header and uses the second as the request path (the destination):

AFSOperationPayload.AddRequestHeader('x-ms-file-rename-source', SourceFilePath);
...
AFSOperationPayload.SetPath(DestinationFilePath);

So when External File Storage.MoveFile(SourcePath, TargetPath) is used with an Azure File Share account, the connector asks Azure to rename the target file to the source location. The target file does not exist yet, so the move fails.

Expected behavior

The file is moved from FolderA/ to FolderA/Archive/.

Steps to reproduce
  1. Set up an "Ext. File Share Account" and assign it the default file scenario.

  2. Upload a file, e.g. FolderA/Test file.txt.

  3. Run:

    ExternalFileStorage.Initialize(Enum::"File Scenario"::Default);
    ExternalFileStorage.MoveFile('FolderA/Test file.txt', 'FolderA/Archive/Test file.txt');
    
Additional context

No response

I will provide a fix for a bug
  • I will provide a fix for a bug
主要言語
AL
スター
714
フォーク
482
平均マージ
3日 6時間
マージ済み PR(30日)
556

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/BCApps のほかの issue

microsoft/BCApps の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。