instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.41k stars 2.42k forks source link

Unexpected file renaming format (with files with multiple periods) #2310

Open NovaSagittarii opened 4 months ago

NovaSagittarii commented 4 months ago

Summary:

Resubmitting files with the same name results in unexpected renaming format.

Steps to reproduce:

  1. Submit a file. The file should have multiple periods. image
  2. Submit the same file again. image

Expected behavior:

The renamed file inserts -1 (-{X} in general) after the last period. (test.test.test-1.pdf in this case)

Actual behavior:

The renamed file has -1 inserted after the first period. (test-1.test.test.pdf in this case)

Additional notes: