Skip to content
Browse files

Don't warn the user that the file isn't writeable when he is editing …

…a path that doesn't yet exist!
  • Loading branch information...
1 parent fd93f96 commit 0a63e6b29d86b1a5f79487b46ab5abda3ae2bed5 @lasersox lasersox committed Sep 24, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 rmate
View
2 rmate
@@ -114,7 +114,7 @@ end
cmds = []
ARGV.each do |path|
abort "File #{path} is not writable! Use -f/--force to open anyway." unless force or File.writable? path or not File.exists? path
- $stderr.puts "File #{path} is not writable. Opening anyway." if not File.writable? path and $verbose
+ $stderr.puts "File #{path} is not writable. Opening anyway." if not File.writable? path and File.exists? path and $verbose
cmd = Command.new("open")
cmd['display-name'] = "#{Socket.gethostname}:#{path}"
cmd['real-path'] = File.expand_path(path)

0 comments on commit 0a63e6b

Please sign in to comment.
Something went wrong with that request. Please try again.