371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
|
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
|
-
+
+
+
+
+
|
;; 'copy
;; 'link))
(db (datashare:open-db configdat))
(iteration (datashare:register-data db area-name version publish-type submitter quality spath comment))
(dest-store (datastore:get-best-storage configdat)))
(if iteration
(if (eq? 'copy publish-type)
(datashare:import-data configdat spath dest-store area-name version iteration))
(datashare:import-data configdat spath dest-store area-name version iteration)
(let ((id (datastore:get-id db area-name version iteration)))
(datastore:set-stored-path db id spath)
(datastore:set-copied db id "yes")
(datastore:set-copied db id "n/a")))
(print "ERROR: Failed to get an iteration number"))
(sqlite3:finalize! db))))
(copy (iup:button "Copy and Publish"
#:expand "HORIZONTAL"
#:action (lambda (obj)
(publish 'copy))))
(link (iup:button "Link and Publish"
|