<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -39,27 +39,23 @@ module TextMate
       unless dst.nil?
         FileUtils.touch(dst) unless File.exists?(dst) or not File.writable?(File.dirname(dst))
         return if File.exists?(dst) and File.read(dst) == doc
-      end
-      
-      if dst.nil?
+      else
         ENV['TM_FILEPATH']         = dst = TextMate::IO.tempfile(temp_ext).path
         ENV['TM_FILENAME']         = File.basename dst
         ENV['TM_FILE_IS_UNTITLED'] = &quot;true&quot;
         ENV['TM_DISPLAYNAME']      = 'untitled'
         Dir.chdir(File.dirname(ENV[&quot;TM_FILEPATH&quot;]))
-      elsif not File.writable? dst
+      end
+
+      begin
+        open(dst, 'w') { |io| io &lt;&lt; doc }
+      rescue Errno::EACCES
         ENV['TM_ORIG_FILEPATH']    = dst
         ENV['TM_ORIG_FILENAME']    = File.basename dst
         ENV['TM_FILEPATH']         = dst = TextMate::IO.tempfile(temp_ext).path
         ENV['TM_FILENAME']         = File.basename dst
         ENV['TM_DISPLAYNAME']     += ' (M)'
       end
-      
-      begin
-        open(dst, 'w') { |io| io &lt;&lt; doc }
-      rescue Errno::EACCES
-        # we already checked writable? so this is a real issue
-      end
     end
   end
 end
\ No newline at end of file</diff>
      <filename>Support/lib/tm/save_current_document.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f0e6a13f7fb32a6fc6f48006875cdb9fea7a2749</id>
    </parent>
  </parents>
  <author>
    <name>aross</name>
    <email>aross@dfb7d73b-c2ec-0310-8fea-fb051d288c6d</email>
  </author>
  <url>http://github.com/kballard/textmate-bundles/commit/f43cbb3d376a684e1d5e3347f82e92ddeb976423</url>
  <id>f43cbb3d376a684e1d5e3347f82e92ddeb976423</id>
  <committed-date>2009-11-02T18:13:22-08:00</committed-date>
  <authored-date>2009-11-02T18:13:22-08:00</authored-date>
  <message>Just a little bit of refactoring.  No functional change.



git-svn-id: http://svn.textmate.org/trunk@11799 dfb7d73b-c2ec-0310-8fea-fb051d288c6d</message>
  <tree>0286bbfca4f4c9105f68eadcd4e5daf050cdcb73</tree>
  <committer>
    <name>aross</name>
    <email>aross@dfb7d73b-c2ec-0310-8fea-fb051d288c6d</email>
  </committer>
</commit>
