0

When I try to save a file in sublime from a mapped network drive I get an error:

Unable to save Y:\MySite\index.html
Error: The requested operation cannot be performed on a file with a user-mapped section

This error does not happen in Notepad, and is coming from Sublime Text rather than windows, which makes me think Sublime is trying to do something funky during the save process.

What I've tried:

  • The file is open somewhere else. No, I can save the file in Notepad.

  • There may be an issue with user permissions Maybe, however I'm not sure how to fix it.
    The linked post is not specific. I shared the folder by

    Right-Click > Properties > Sharing > Share, added "Everyone", and gave them "Read/Write" permission.

    Could it be that "Everyone" doesn't cover the Sublime user? (Note: I have tried to run sublime as admin, to no avail)


More Details:

Environment:

  • My local computer ("The Host") hosts a Windows 7 Virtual Machine ("The Guest"), which is running Jetty
  • Jetty serves folders from webapps as web servers
  • I set up webapps to be shared with Everyone
  • On the host I mapped webapps so I can edit files locally.

Here's a pic of my Network Folder setup:

enter image description here

The Issue:

When I locally edit a webapps file in Sublime, and Jetty is running in the guest, I get this error when I try to save it:

enter image description here

However, if I edit the same file in Notepad it works fine.


This seems like a Sublime error rather than a windows error, meaning it's perhaps trying to do something funky with the file rather than saving it. Has anyone else experienced this?

Travis Heeter
  • 13,002
  • 13
  • 87
  • 129

1 Answers1

1

Thanks to Joakim Erdfelt's answer to my other question I got this figured out!

This is an issue with windows' memory buffering, but you can fix it in a Jetty config file. See the docs for more info. Here's what I did:

  1. Find your webdefault.xml file.

    • Mine was in C:\Place_where_Jetty_was_installed\Jetty\etc\
  2. Open it and search for UseFileMappedBuffer. Look for this:

    <init-param>
      <param-name>useFileMappedBuffer</param-name>
      <param-value>true</param-value>
    </init-param>
    
  3. Set param-value to false

    <param-value>false</param-value>
    
Travis Heeter
  • 13,002
  • 13
  • 87
  • 129