@@ -130,14 +130,13 @@ func worker(wg *sync.WaitGroup, jobs <-chan *syncer.Syncer) {
130130func performSync (s * syncer.Syncer ) error {
131131 s .Log .Info ("Running..." )
132132
133- var gcloneParams []string
134- if strings .Contains (s .GlobalConfig .Rclone .Path , "gclone" ) &&
135- s .RemoteServiceAccountFiles .ServiceAccountsCount () > 0 {
133+ var liveRotateParams []string
134+ if s .GlobalConfig .Rclone .LiveRotate && s .RemoteServiceAccountFiles .ServiceAccountsCount () > 0 {
136135 // start web-server
137136 s .Ws .Run ()
138137 defer s .Ws .Stop ()
139138
140- gcloneParams = append (gcloneParams ,
139+ liveRotateParams = append (liveRotateParams ,
141140 "--drive-service-account-url" ,
142141 fmt .Sprintf ("http://%s:%d" , s .Ws .Host , s .Ws .Port ),
143142 )
@@ -147,7 +146,7 @@ func performSync(s *syncer.Syncer) error {
147146 if len (s .Config .Remotes .Copy ) > 0 {
148147 s .Log .Info ("Running copies..." )
149148
150- if err := s .Copy (gcloneParams ); err != nil {
149+ if err := s .Copy (liveRotateParams ); err != nil {
151150 return errors .WithMessage (err , "failed performing all copies" )
152151 }
153152
@@ -158,7 +157,7 @@ func performSync(s *syncer.Syncer) error {
158157 if len (s .Config .Remotes .Sync ) > 0 {
159158 s .Log .Info ("Running syncs..." )
160159
161- if err := s .Sync (gcloneParams ); err != nil {
160+ if err := s .Sync (liveRotateParams ); err != nil {
162161 return errors .WithMessage (err , "failed performing all syncs" )
163162 }
164163
0 commit comments