mirror of
				https://github.com/OpenFusionProject/Client.git
				synced 2025-11-04 04:40:24 +00:00 
			
		
		
		
	Compare commits
	
		
			1 Commits
		
	
	
		
			b752fd7e3e
			...
			bfaad6e098
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					bfaad6e098 | 
@@ -294,7 +294,7 @@ function restoreDefaultVersions() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function editConfig() {
 | 
			
		||||
    var jsonToModify = JSON.parse(remotefs.readFileSync(configPath));
 | 
			
		||||
    var jsonToModify = JSON.parse(remotefs.readJsonSync(configPath));
 | 
			
		||||
 | 
			
		||||
    jsonToModify["autoupdate-check"] = $("#editconfig-autoupdate").prop("checked");
 | 
			
		||||
    jsonToModify["cache-swapping"] = $("#editconfig-cacheswapping").prop("checked");
 | 
			
		||||
@@ -302,17 +302,14 @@ function editConfig() {
 | 
			
		||||
    jsonToModify["verify-offline-cache"] = $("#editconfig-verifyofflinecache").prop("checked");
 | 
			
		||||
 | 
			
		||||
    var dirInput = $("#editconfig-offlinecachelocation:text").val();
 | 
			
		||||
    var shouldChangeRoot = (
 | 
			
		||||
 | 
			
		||||
    jsonToModify["offline-cache-location"] = (
 | 
			
		||||
        remotefs.existsSync(dirInput) &&
 | 
			
		||||
        remotefs.statSync(dirInput).isDirectory()
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
    jsonToModify["offline-cache-location"] = shouldChangeRoot ? dirInput : offlineRoot;
 | 
			
		||||
    ) ? dirInput : offlineRoot;
 | 
			
		||||
 | 
			
		||||
    remotefs.writeFileSync(configPath, JSON.stringify(jsonToModify, null, 4));
 | 
			
		||||
 | 
			
		||||
    loadConfig();
 | 
			
		||||
    if (shouldChangeRoot) handleCache("hash-check", null, "offline");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function validateCacheLocation() {
 | 
			
		||||
 
 | 
			
		||||
@@ -536,7 +536,7 @@
 | 
			
		||||
                                    class="form-control form-row w-75"
 | 
			
		||||
                                    id="editconfig-offlinecachelocation"
 | 
			
		||||
                                    type="text"
 | 
			
		||||
                                    oninput="validateCacheLocation()"
 | 
			
		||||
                                    oninput="validateCacheLocator()"
 | 
			
		||||
                                />
 | 
			
		||||
                            </form>
 | 
			
		||||
                        </div>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user