@@ -59,9 +59,9 @@ public static function create($class, array $settings = null)
59
59
if (!in_array ($ class , self ::$ _classes_supported )) {
60
60
throw new \Backup \Exception \InvalidArgumentException ('Class not supported. ' );
61
61
}
62
-
62
+ $ path = ( isset ( $ settings [ ' binary_path ' ])? $ settings [ ' binary_path ' ]: null );
63
63
if ($ class === 'Duplicity ' ) {
64
- $ binary = new Binary ('duplicity ' );
64
+ $ binary = new Binary ($ path ? $ path : 'duplicity ' );
65
65
66
66
if (empty ($ settings ['path_to_backup ' ]) || empty ($ settings ['destination ' ])) {
67
67
throw new \Backup \Exception \InvalidArgumentException ('Please see the documentation for the settings needed. ' );
@@ -82,7 +82,7 @@ public static function create($class, array $settings = null)
82
82
83
83
return $ duplicity ;
84
84
} elseif ($ class === 'Tar ' ) {
85
- $ binary = new Binary ('tar ' );
85
+ $ binary = new Binary ($ path ? $ path : 'tar ' );
86
86
87
87
if (empty ($ settings ['path_to_backup ' ]) || empty ($ settings ['destination ' ])) {
88
88
throw new \Backup \Exception \InvalidArgumentException ('Please see the documentation for the settings needed. ' );
@@ -99,7 +99,7 @@ public static function create($class, array $settings = null)
99
99
100
100
return $ tar ;
101
101
} elseif ($ class === 'Borg ' ) {
102
- $ binary = new Binary ('borg ' );
102
+ $ binary = new Binary ($ path ? $ path : 'borg ' );
103
103
104
104
if (empty ($ settings ['path_to_backup ' ]) || empty ($ settings ['destination ' ])) {
105
105
throw new \Backup \Exception \InvalidArgumentException ('Please see the documentation for the settings needed. ' );
0 commit comments