Permalink
Browse files

Small change on the "tar"-call (usage of the "-f" parm).

  • Loading branch information...
1 parent 12441c9 commit b09d38f2592cb9b5e184fe94bb941e0603a551b9 @szimmermann szimmermann committed Mar 28, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/backup/model.rb
  2. +1 −1 spec/model_spec.rb
View
@@ -240,7 +240,7 @@ def perform!
# becomes a single (transferrable) packaged file.
def package!
Logger.message "Backup started packaging everything to a single archive file."
- run("#{ utility(:tar) } -c -C '#{ TMP_PATH }' '#{ TRIGGER }' > '#{ File.join(TMP_PATH, "#{TIME}.#{TRIGGER}.tar") }'")
+ run(%|#{ utility(:tar) } -c -f '#{ File.join(TMP_PATH, "#{TIME}.#{TRIGGER}.tar") }' -C '#{ TMP_PATH }' '#{ TRIGGER }'|)
end
##
View
@@ -205,7 +205,7 @@ def initialize(&block); end
it 'should package the folder' do
model.expects(:utility).with(:tar).returns(:tar)
- model.expects(:run).with("tar -c -C '#{ Backup::TMP_PATH }' '#{ Backup::TRIGGER }' > '#{ File.join( Backup::TMP_PATH, "#{ Backup::TIME }.#{ Backup::TRIGGER }.tar" ) }'")
+ model.expects(:run).with(%|tar -c -f '#{ File.join( Backup::TMP_PATH, "#{ Backup::TIME }.#{ Backup::TRIGGER }.tar" ) }' -C '#{ Backup::TMP_PATH }' '#{ Backup::TRIGGER }'|)
model.send(:package!)
end

0 comments on commit b09d38f

Please sign in to comment.