View Issue Details

IDProjectCategoryView StatusLast Update
0008466Multi Theft Auto : San AndreasMulti Theft Auto : San Andreaspublic2014-08-20 15:01
ReporterEt-winAssigned Toccw 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformMulti Theft Auto San Andreas 1.4OSWindowsOS Version8.1
Product Version 
Target Version1.4.1Fixed in Version1.4.1 
Summary0008466: New XML file doesn't replace correctly after messing up
Description

Hello,

As the title says it, the XML files which are messed up don't get replaced. It will leave another file, please check 'Steps To Reproduce' and you will see.

Thanks~

Steps To Reproduce

Script:
function testfile()
local lFile = xmlLoadFile("settings.xml")
if (lFile == false) then
lFile = xmlCreateFile("settings.xml", "settings")
end
if (lFile ~= false) then
--Stuff.
xmlSaveFile(lFile)
xmlUnloadFile(lFile)
else
outputChatBox("Error")
end
end

addCommandHandler("file", testfile)

  1. Start the script.
  2. Use: /file
  3. Go to the XML file and mess it up. (E.G.: You will see "<settings></settings>", change it to "<setti" or just empty the file)
  4. Use: /file

Now a new file will be created called 'settings.xmlnew' and the normal file is not replaced.

TagsNo tags attached.

Activities

Et-win

2014-08-18 10:44

viewer   ~~0021790

Seems only to do this at client-side and not at server-side XML files.

Grafu

2014-08-18 21:14

viewer   ~~0021796

Seems to be intended behavior.

Et-win

2014-08-18 21:37

viewer   ~~0021797

I doubt it. You can't do anything with the settings.xmlnew file because it will still load settings.xml. Also, you can't do anything with both files because you have to close MTA first.

This wasn't a problem in MTA 1.3.5

Dutchman101

2014-08-20 14:55

updater   ~~0021820

Fixed in https://code.google.com/p/mtasa-blue/source/detail?r=6817

Issue History

Date Modified Username Field Change