Project

General

Profile

Actions

Bug #1799

closed

Losing data tables when using “Export”

Added by Veronique Connolly almost 20 years ago. Updated over 19 years ago.

Status:
Resolved
Priority:
Immediate
Assignee:
Category:
morpho - general
Target version:
Start date:
12/02/2004
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
1799

Description

I exported a data package (dp) and when I checked the “data” subdirectory
generated from the export, not all the files corresponding to my dp’s data
tables (dt) were there.

I had three dt in my dp, and the 2nd one was one that I had created using the
“Describe” option (New DataTable Wizard/Describe/Automatic). The dt I was
missing after the export was the 3rd one displayed in the dp.

I investigated and created a few dp with varying numbers of dt, always including
a dt created with “Describe” (the other dt were created by automatically
importing a text file) and making sure the “describe” dt was always followed by
at least one dt. After I exported these dp, the dt missing were always the ones
that followed the “describe” dt.

Actions #1

Updated by Saurabh Garg almost 20 years ago

Fixed. (Replaced return with continue in the for loop)

Another issue I found with export:
When a datapackage has two data files with same names (for example two files
from different directories having same generic name like 'data'). When the
user exports the datapackage, there will be only one file in the data directory
as morpho export the data with the same filenames as the original file. Hence
after both the files have been written to data directory, there is only one
data file.

Possible solutions:
1. Close this bug and enter this as a new bug to be taken care of in the next
release.
2. Name the data files with there assigned urls. e.g. knb.213.1
3. Create directories with names as assigned urls and save data files in there
seperate directories.
4. Something else that I cannot think of.

Actions #2

Updated by Matt Jones almost 20 years ago

Also could try:

5. Check for naming conflict before writing the file, and if a file already
exists withthe same name, append a suffix onto the end of the basename (e.g.,
data.txt renamed to data-1.txt before being exported).

Actions #3

Updated by Saurabh Garg over 19 years ago

Fixed the bug in last comments using the third suggection - create directories
with names as assigned urls and save data files in there seperate directories

Actions #4

Updated by Saurabh Garg over 19 years ago

Both I and Veronique tested the fix. It is running fine. Closing the bug.

Actions #5

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 1799

Actions

Also available in: Atom PDF