File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -335,7 +335,15 @@ func InstallPrivoxy() {
335335 }
336336 }
337337
338- let userConfigPath = homeDir + USER_CONFIG_DIR + " user-privoxy.config "
338+ let userConfigDir = homeDir + USER_CONFIG_DIR
339+ // Make dir: '~/.ShadowsocksX-NG'
340+ if !fileMgr. fileExists ( atPath: userConfigDir) {
341+ try ! fileMgr. createDirectory ( atPath: userConfigDir
342+ , withIntermediateDirectories: true , attributes: nil )
343+ }
344+
345+ // Install empty `user-privoxy.config` file.
346+ let userConfigPath = userConfigDir + " user-privoxy.config "
339347 if !fileMgr. fileExists ( atPath: userConfigPath) {
340348 let srcPath = Bundle . main. path ( forResource: " user-privoxy " , ofType: " config " ) !
341349 try ! fileMgr. copyItem ( atPath: srcPath, toPath: userConfigPath)
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ func SyncPac() {
3636 }
3737
3838 let fileMgr = FileManager . default
39- if !fileMgr. fileExists ( atPath: PACRulesDirPath ) {
39+ if !fileMgr. fileExists ( atPath: PACFilePath ) {
4040 needGenerate = true
4141 }
4242
You can’t perform that action at this time.
0 commit comments