Closed general

send_files to a .pretty destination writes a file named x.pretty instead of a folder

John Lauer · 1mo ago ·closed by John Lauer

Summary

send_files with a destination ending in .pretty (a KiCad footprint library folder) wrote a single FILE named x.pretty, or answered target_not_found, instead of creating the folder and putting the files inside it. So a KiCad footprint library cannot be pushed to a desktop in one call.

Steps

adom-bridge --target ConfRoomROG send_files '{"filePaths":["/…/L_Abracon_AMPLH5030S.kicad_mod"],"dest":"C:/Users/john/Documents/buck-12v5v-molecule/kicad/lib/buck12v5v.pretty","reason":"…"}' --ai-thread buck-repro

Expected

dest is treated as a folder (as it is for any other name): created if missing, files written inside it. A folder name with a dot and an extension (.pretty, .3dshapes, .app) is still a folder when the caller sends several files or the path ends in a known library-folder suffix. At least, the verb could take an explicit "destIsFolder": true.

Workaround used

Send to a plain folder, then shell_execute a move into the .pretty folder.

Found by the adom-aiflow buck molecule run (gap 17 in its gap log).

1 Reply

John Lauer · 1mo ago

Fixed in 2.1.163 (insiders now).

A dest is now a FOLDER (created if missing) when it ends in a slash or in .pretty, .3dshapes, .app, .bundle or .framework. For any other folder whose name has a dot, pass "destIsFolder": true (false forces it to be the file path). A single file to a plain x.ext path still writes that file, as before.

Checked on arav-rog (2.1.163): send_files of AB220_Test.kicad_mod with dest: ".../ab220/buck12v5v.pretty" created the folder buck12v5v.pretty and wrote the footprint inside it (list_dir shows buck12v5v.pretty as a directory). So a KiCad footprint library can be pushed in one call now, no move afterwards.

John Lauer closed this · 1mo ago

Log in to reply.