Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#13,401 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu tại ExtFileShareConnectorImpl.Codeunit.al, ở thủ tục MoveFile, rồi kiểm tra khai báo và phần triển khai RenameFile trong AFS File Client Impl. Issue chỉ ra rằng các đối số nguồn và đích bị đảo vị trí; hãy đối chiếu lời gọi với thứ tự tham số của RenameFile. Hoàn tất khi việc di chuyển tệp từ FolderA/ sang FolderA/Archive/ thành công và tệp nguồn nằm ở đích.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
AL
Star
714
Fork
482
Merge trung bình
3 ngày 6 giờ
Pull request đã merge (30 ngày)
556

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/BCApps

Tất cả issue của microsoft/BCApps

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.