|
@@ -254,19 +254,18 @@ String function get_entry_id(name : String):
|
|
|
String elem
|
|
|
Boolean found
|
|
|
|
|
|
- log("Searching for " + name)
|
|
|
if (name == ""):
|
|
|
return caches["root"]!
|
|
|
|
|
|
- //if (dict_in(caches["models"], name)):
|
|
|
- // if (full_name(caches["models"][name]) == name):
|
|
|
- // return caches["models"][name]!
|
|
|
+ if (dict_in(caches["models"], name)):
|
|
|
+ if (full_name(caches["models"][name]) == name):
|
|
|
+ return caches["models"][name]!
|
|
|
|
|
|
current = get_entry_id(get_foldername(name))
|
|
|
+
|
|
|
if (current == ""):
|
|
|
return ""!
|
|
|
|
|
|
- log("Got result!")
|
|
|
if (current_part != ""):
|
|
|
elems = allAssociationDestinations(core, current, "contains")
|
|
|
while (set_len(elems) > 0):
|
|
@@ -277,7 +276,6 @@ String function get_entry_id(name : String):
|
|
|
else:
|
|
|
return current!
|
|
|
|
|
|
- log("NOT FOUND")
|
|
|
return ""!
|
|
|
|
|
|
String function get_service_id(name : String):
|
|
@@ -326,8 +324,9 @@ String function create_folders(user_id : String, folder_name : String):
|
|
|
String new_entry
|
|
|
String cummul
|
|
|
|
|
|
- if (folder_name == ""):
|
|
|
- return get_entry_id("")!
|
|
|
+ if (get_entry_id(folder_name) != ""):
|
|
|
+ // Folders already exist, so don't iterate
|
|
|
+ return get_entry_id(folder_name)!
|
|
|
|
|
|
i = 0
|
|
|
hierarchy = string_split(folder_name, "/")
|
|
@@ -362,7 +361,7 @@ String function store_entry(model_id : String, full_name : String, user_id : Str
|
|
|
prev = create_folders(user_id, get_foldername(full_name))
|
|
|
log("Created folders up to: " + cast_v2s(read_attribute(core, prev, "name")))
|
|
|
instantiate_link(core, "contains", "", prev, model_id)
|
|
|
- return get_filename(full_name)!
|
|
|
+ return full_name!
|
|
|
|
|
|
String function export_typing(model : Element, name : String, user_id : String):
|
|
|
String result
|