Preserve file extension

This commit is contained in:
2025-07-21 11:10:11 +03:00
parent 4b5c4a577a
commit 951dff84fa

View File

@@ -150,7 +150,7 @@ func processFile(filePath, destDir, counterPath string, counter *int) {
*counter++ *counter++
saveCounter(counterPath, *counter) saveCounter(counterPath, *counter)
newName := fmt.Sprintf("%05d", *counter) newName := fmt.Sprintf("%05d%s", *counter, filepath.Ext(filePath))
destPath := filepath.Join(destDir, newName) destPath := filepath.Join(destDir, newName)
_, err := os.Stat(destPath) _, err := os.Stat(destPath)