multitheftauto / mtasa-resources

This project maintains a list of up-to-date resources that come with Multi Theft Auto.
https://multitheftauto.com
MIT License
151 stars 151 forks source link

[editor] Fix duplicate map meta entries resulting in editor suspending. #543

Closed chris1384 closed 1 week ago

chris1384 commented 2 weeks ago

Fixes #538

Screenshot_24

This does not check for multiple files with different attributes (ex. scripts type that use both client and server instead of shared).

jlillis commented 1 week ago

I'm not sure ignoring duplicate entries is the best idea - there should a warning shown to the user informing them of the issue. If editor is duplicating files that means there is a bug that needs to be fixed.

chris1384 commented 1 week ago

dup

The editor does exactly what the map meta contains, but it fails at fileCopy if there's a file already copied. I wouldn't say that the editor is at fault here, it's either the users fault or an another resource with general.ModifyOtherObjects permissions and writes extra lines in the meta. I can't think of a better approach for this so feel free to suggest anything. :d

jlillis commented 1 week ago

I wouldn't say that the editor is at fault here, it's either the users fault or an another resource with general.ModifyOtherObjects permissions and writes extra lines in the meta.

I think you're probably right. If this breaks anything at least we'll have a debug warning to trace it with.