diff --git a/lib/snapsync/cli.rb b/lib/snapsync/cli.rb index 4920de6..55da9ab 100644 --- a/lib/snapsync/cli.rb +++ b/lib/snapsync/cli.rb @@ -214,7 +214,7 @@ def init(*args) option :config_file, default: '/etc/snapsync.conf', desc: 'the configuration file that should be updated' def auto_add(name, dir) - uuid, mountpoint, relative = partition_of(Snapsync::path(dir)) + uuid, mountpoint, relative = partition_of(dir) conf_path = Pathname.new(options[:config_file]) autosync = AutoSync.new snapsync_config_file: conf_path diff --git a/lib/snapsync/partitions_monitor.rb b/lib/snapsync/partitions_monitor.rb index 6653643..b62d8a6 100644 --- a/lib/snapsync/partitions_monitor.rb +++ b/lib/snapsync/partitions_monitor.rb @@ -14,7 +14,7 @@ class PartitionsMonitor # @param [RemotePathname] machine Remote machine to connect to def initialize(machine = nil) - if machine.nil? + if machine.nil? | machine.is_a?(LocalPathname) dbus = DBus::SystemBus.instance else sock_path = '/tmp/snapsync_%04d_remote.sock' % rand(10000)