dynamicdan / sn-filesync

2-way sync ServiceNow field values to local files
MIT License
66 stars 37 forks source link

preLoadList files doesn't honor subDirPattern settings in folders #38

Closed lsyoyo closed 7 years ago

lsyoyo commented 7 years ago

Thanks for this useful tool!

The issue is, for example, if there's a business_rules rule.js, with subDirPattern: collection/when, it would land at buiness_rules/table_name/after/rule.js if it's downloaded by search. However if it's included the in preLoadList, the file would end up at buiness_rules/rule.js. It wouldn't keep the same final downloaded folder file structures.

As a results of these, if I share a exported settings.json to other people, the resulting workspace folder would look quite different from mine which generated the settings.

dynamicdan commented 7 years ago

Thanks for reporting this issue! I see that the export/preLoad feature is lacking support to build the sub dir pattern properly. This is something I'll look into supporting. Does a --re-sync fix the issue?

dynamicdan commented 7 years ago

I've added support and will push up a fix after I've done more testing.

dynamicdan commented 7 years ago

Finally pushed up latest code. Please test and let me know if everything is great.

dynamicdan commented 7 years ago

Assessing as closed.