mirror of
https://github.com/syncthing/syncthing.git
synced 2026-05-19 06:08:57 -04:00
lib/versioner: Add placeholder to provide the absolute file path to external commands
This commit adds support for a new placeholder, %FILE_PATH_FULL%, to the command of the external versioner. The placeholder will be replaced by the absolute path of the file that should be deleted.
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"errors"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -74,6 +75,7 @@ func (v External) Archive(filePath string) error {
|
||||
"%FOLDER_FILESYSTEM%": v.filesystem.Type().String(),
|
||||
"%FOLDER_PATH%": v.filesystem.URI(),
|
||||
"%FILE_PATH%": filePath,
|
||||
"%FILE_PATH_FULL%": filepath.Join(v.filesystem.URI(), filePath),
|
||||
}
|
||||
|
||||
for i, word := range words {
|
||||
|
||||
Reference in New Issue
Block a user