sunjw / jstoolnpp

A JavaScript (JSON) tool for Notepad++ (formerly JSMinNpp) and Visual Studio Code.
GNU General Public License v2.0
283 stars 24 forks source link

JSTool's options cannot be saved when notepad++ installed in a dir which has blank (space) in full path #66

Closed AnyinSong closed 6 years ago

AnyinSong commented 6 years ago

Description of the Issue

JSTool's options cannot be saved when notepad++ installed in a dir which has blank in full path

Steps to Reproduce the Issue

  1. Install notepad++ in "C:\Program Files (x86)\Notepad++"
  2. Put JSMinNPP.dll (ver 1.22.0) into plugins directory
  3. Restart notepad++
  4. Modify any option in plugins->JSTool->Options and click OK
  5. Check the option in plugins->JSTool->Options

Expected Behavior

options changed should be saved

Actual Behavior

all options are still default value even though I have modified them in step 3.

Debug Information

sunjw commented 6 years ago

Hi, @AnyinSong I cannot reproduce the bug you reported. I've installed Notepad++ 7.5.6 x86 on a Windows 10 x64 machine, within the path "C:\Program Files (x86)\Notepad++" as you described and which is also the default path in installer. Copy JSMinNpp.dll into plugins dir under "C:\Program Files (x86)\Notepad++". I've tried change options and everything works well. And also I've tried another path with space in it, everything works well. So I think it is related to directory priviledge. I'd like to know if you changed these options when installing npp. npp installer If you checked 1st option, npp will save plugin option files into install directory which is "C:\Program Files (x86)\Notepad++". But the "Program Files" directory is protected by Windows, and npp with normal privilege cannot modify files under this path. If you installed npp with all default option (click Next without change anything), npp will save plugin option files under "C:\Users\$your_user_name\AppData\Roaming\Notepad++\plugins\config\" which is able to modify by normal privilege process. So I think you need to check if you have changed this option when you install npp, and if the config directory is under your account path. Thanks.

AnyinSong commented 6 years ago

@sunjw ,I checked “Don't use %APPDATA% ” and installed 7.5.8 x86 on win7 x64 and win10 x64. I have changed install dir to "C:\ProgramFiles\Notepad++" to avoid this problem ^^