S3Sync.net
February 02, 2014, 01:19:41 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: s3sync fails if invoked via symlink  (Read 3063 times)
scottg
Newbie
*
Posts: 1


View Profile
« on: October 13, 2008, 08:01:11 PM »

s3sync and s3cmd won't work if they're referenced via a symlink. For example, I copied the s3sync folder to /usr/local/s3sync, then created the following symlinks:

  /usr/local/bin/s3sync -> /usr/local/s3sync/s3sync.rb
  /usr/local/bin/s3cmd -> /usr/local/s3sync/s3cmd.rb

The problem is that the File.expand_path(File.dirname(__FILE__)) trick at the top of each file doesn't resolve symlinks. A solution is to replace it with Pathname.new(__FILE__).realpath.parent.to_s.

I'm attaching a patch.

  Scott
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!