Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

:relative_paths option doesn't work for single directory in 2.2.0 #170

Closed
sunaku opened this Issue · 3 comments

2 participants

@sunaku

Hello,

I'm using Listen 2.2.0 with :relative_paths option but the reported paths are absolute:

## ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
2.0.0p247 :001 > require 'listen'
true
2.0.0p247 :004 > l = Listen.to('.', :relative_paths => true) {|*a| p a }
#<Listen::Listener:0x00000000e25d88
 @block=#<Proc:0x00000000e25db0@(irb):4>,
 @changes=[],
 @directories=[#<Pathname:/home/skurapati/lab/tork>],
 @options=
  {:debug=>false,
   :latency=>nil,
   :wait_for_delay=>0.1,
   :force_polling=>false,
   :polling_fallback_message=>nil,
   :relative_paths=>true}>
2.0.0p247 :005 > l.start
#<Thread:0x00000000a30c00 run>
2.0.0p247 :006 >

# now save some files in or beneath the current directory.
# I saved the ./bin/tork-herald file in my editor and then:

[["/home/skurapati/lab/tork/bin/4913"], ["/home/skurapati/lab/tork/bin/tork-herald", "/home/skurapati/lab/tork/bin/tork-herald~", "/home/skurapati/lab/tork/bin/4913"], ["/home/skurapati/lab/tork/bin/tork-herald", "/home/skurapati/lab/tork/bin/4913"]]
[["/home/skurapati/lab/tork/bin/tork-herald"], [], ["/home/skurapati/lab/tork/bin/tork-herald~"]]

Thanks for your consideration.

@sunaku sunaku referenced this issue from a commit in sunaku/tork
@sunaku sunaku herald: listen 2.2.0 is non-blocking and absolute
* Calling #start no longer blocks the caller.

* The :relative_paths option no longer works:
  guard/listen#170
f54accc
@thibaudgg
Owner

Hi @sunaku,

That's normal, relative_paths option has been removed in 2.0.0 release.

@sunaku sunaku referenced this issue from a commit in sunaku/tork
@sunaku sunaku herald: listen 2.2.0 is non-blocking and absolute
* Calling #start no longer blocks the caller.

* The :relative_paths option no longer works:
  guard/listen#170
ec8b91d
@sunaku

Ah, that explains it! :sweat_smile:

But I didn't see this non-backwards compatible API change mentioned in the release notes for 2.0.0. Would you please mind mentioning it there? :neckbeard:

@thibaudgg
Owner

Good point, it's fixed now. Sorry for its absence.

@thibaudgg thibaudgg closed this
@sunaku sunaku referenced this issue from a commit in sunaku/tork
@sunaku sunaku herald: listen 2.2.0 is non-blocking and absolute
* Calling #start no longer blocks the caller.

* The :relative_paths option no longer works:
  guard/listen#170
83caab8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.