Project

General

Profile

Bug #1799

Losing data tables when using “Export”

Added by Veronique Connolly almost 15 years ago. Updated over 14 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.

History

#1 Updated by Saurabh Garg over 14 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.

#2 Updated by Matt Jones over 14 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).

#3 Updated by Saurabh Garg over 14 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

#4 Updated by Saurabh Garg over 14 years ago

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

#5 Updated by Redmine Admin over 6 years ago

Original Bugzilla ID was 1799

Also available in: Atom PDF