file: Point FILE_TYPE_LEGACY to ~/.ocarina/library/

The legacy file type will only be used for importing old libraries, so
point things to this directory on construction.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This commit is contained in:
Anna Schumaker 2014-01-01 14:11:53 -05:00 committed by Anna Schumaker
parent 371b988dac
commit 94fdfda9fb
2 changed files with 5 additions and 4 deletions

View File

@ -41,6 +41,7 @@ void File :: find_dir(std::string &res)
default: /* FILE_TYPE_LEGACY */
res += ".";
res += OCARINA_DIR;
res += "/library";
}
}

View File

@ -66,12 +66,12 @@ Test 4d: ERROR: A file with hint = FILE_TYPE_INVALID cannot be opened
Passed
Test 4e: Passed
Test 5a: File path is /home/anna/.ocarina-test/file.5a
Test 5b: ERROR: NOT_OPEN is not a legal OpenMode (/home/anna/.ocarina-test/file.5b)
Test 5a: File path is /home/anna/.ocarina-test/library/file.5a
Test 5b: ERROR: NOT_OPEN is not a legal OpenMode (/home/anna/.ocarina-test/library/file.5b)
Passed
Test 5c: ERROR: File does not exist (/home/anna/.ocarina-test/file.5c)
Test 5c: ERROR: File does not exist (/home/anna/.ocarina-test/library/file.5c)
Passed
Test 5d: ERROR: Cannot write to legacy files (/home/anna/.ocarina-test/file.5d)
Test 5d: ERROR: Cannot write to legacy files (/home/anna/.ocarina-test/library/file.5d)
Passed
Test 5e: Passed