Skip to content

Commit

Permalink
Bug 1519200 - Remove NS_ERROR_FILE_TARGET_DOES_NOT_EXIST in favor o…
Browse files Browse the repository at this point in the history
…f `NS_ERROR_FILE_NOT_FOUND`. r=xpcom-reviewers,nika,dom-storage-reviewers,jstutte

Differential Revision: https://phabricator.services.mozilla.com/D77575
  • Loading branch information
janriokrause committed Apr 5, 2022
1 parent 6d72631 commit 057785b
Show file tree
Hide file tree
Showing 33 changed files with 84 additions and 141 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function removeHistoryFile() {
file.remove(false);
} catch (ex) {
// It is ok if this doesn't exist.
if (ex.result != Cr.NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) {
if (ex.result != Cr.NS_ERROR_FILE_NOT_FOUND) {
throw ex;
}
}
Expand Down
3 changes: 1 addition & 2 deletions dom/cache/FileUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ nsresult DirectoryPaddingWrite(nsIFile& aBaseDir,
const auto kMorgueDirectory = u"morgue"_ns;

bool IsFileNotFoundError(const nsresult aRv) {
return aRv == NS_ERROR_FILE_NOT_FOUND ||
aRv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST;
return aRv == NS_ERROR_FILE_NOT_FOUND;
}

Result<NotNull<nsCOMPtr<nsIFile>>, nsresult> BodyGetCacheDir(nsIFile& aBaseDir,
Expand Down
2 changes: 1 addition & 1 deletion dom/filesystem/FileSystemTaskBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ nsresult FileSystemErrorFromNsError(const nsresult& aErrorValue) {
case NS_ERROR_FILE_DIR_NOT_EMPTY:
return NS_ERROR_DOM_FILESYSTEM_NO_MODIFICATION_ALLOWED_ERR;

case NS_ERROR_FILE_TARGET_DOES_NOT_EXIST:
case NS_ERROR_FILE_NOT_FOUND:
case NS_ERROR_NOT_AVAILABLE:
return NS_ERROR_DOM_FILE_NOT_FOUND_ERR;

Expand Down
26 changes: 11 additions & 15 deletions dom/indexedDB/ActorsParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5718,8 +5718,7 @@ SerializeStructuredCloneFiles(PBackgroundParent* aBackgroundActor,
}

bool IsFileNotFoundError(const nsresult aRv) {
return aRv == NS_ERROR_FILE_NOT_FOUND ||
aRv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST;
return aRv == NS_ERROR_FILE_NOT_FOUND;
}

enum struct Idempotency { Yes, No };
Expand All @@ -5739,8 +5738,8 @@ nsresult DeleteFile(nsIFile& aFile, QuotaManager* const aQuotaManager,

// Callers which pass Idempotency::Yes call this function without checking if
// the file already exists (idempotent usage). QM_OR_ELSE_WARN_IF is not used
// here since we just want to log NS_ERROR_FILE_NOT_FOUND and
// NS_ERROR_FILE_TARGET_DOES_NOT_EXIST results and not spam the reports.
// here since we just want to log NS_ERROR_FILE_NOT_FOUND results and not spam
// the reports.
// Theoretically, there should be no QM_OR_ELSE_(WARN|LOG_VERBOSE)_IF when a
// caller passes Idempotency::No, but it's simpler when the predicate just
// always returns false in that case.
Expand Down Expand Up @@ -12381,10 +12380,10 @@ Result<FileUsageType, nsresult> DatabaseFileManager::GetUsage(
}

// Usually we only use QM_OR_ELSE_LOG_VERBOSE(_IF) with Remove and
// NS_ERROR_FILE_NOT_FOUND/NS_ERROR_FILE_TARGET_DOES_NOT_EXIST
// check, but the file was found by a directory traversal and ToInteger
// on the name succeeded, so it should be our file and if the file
// disappears, the use of QM_OR_ELSE_WARN_IF is ok here.
// NS_ERROR_FILE_NOT_FOUND check, but the file was found by a directory
// traversal and ToInteger on the name succeeded, so it should be our
// file and if the file disappears, the use of QM_OR_ELSE_WARN_IF is ok
// here.
QM_TRY_INSPECT(const auto& thisUsage,
QM_OR_ELSE_WARN_IF(
// Expression.
Expand All @@ -12394,8 +12393,7 @@ Result<FileUsageType, nsresult> DatabaseFileManager::GetUsage(
}),
// Predicate.
([](const nsresult rv) {
return rv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST ||
rv == NS_ERROR_FILE_NOT_FOUND;
return rv == NS_ERROR_FILE_NOT_FOUND;
}),
// Fallback. If the file does no longer exist, treat
// it as 0-sized.
Expand Down Expand Up @@ -12822,17 +12820,15 @@ nsresult QuotaClient::GetUsageForOriginInternal(
databaseFilename + kSQLiteWALSuffix));

// QM_OR_ELSE_WARN_IF is not used here since we just want to log
// NS_ERROR_FILE_NOT_FOUND/NS_ERROR_FILE_TARGET_DOES_NOT_EXIST
// result and not spam the reports (the -wal file doesn't have to
// exist).
// NS_ERROR_FILE_NOT_FOUND result and not spam the reports (the -wal
// file doesn't have to exist).
QM_TRY_INSPECT(const int64_t& walFileSize,
QM_OR_ELSE_LOG_VERBOSE_IF(
// Expression.
MOZ_TO_RESULT_INVOKE_MEMBER(walFile, GetFileSize),
// Predicate.
([](const nsresult rv) {
return rv == NS_ERROR_FILE_NOT_FOUND ||
rv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST;
return rv == NS_ERROR_FILE_NOT_FOUND;
}),
// Fallback.
(ErrToOk<0, int64_t>)));
Expand Down
42 changes: 18 additions & 24 deletions dom/localstorage/ActorsParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,16 +526,14 @@ Result<nsCOMPtr<mozIStorageConnection>, nsresult> CreateStorageConnection(
// to corrupted state, which is ignored here).

// Usually we only use QM_OR_ELSE_LOG_VERBOSE(_IF) with Remove and
// NS_ERROR_FILE_NOT_FOUND/NS_ERROR_FILE_TARGET_DOES_NOT_EXIST
// check, but we're already in the rare case of corruption here,
// so the use of QM_OR_ELSE_WARN_IF is ok here.
// NS_ERROR_FILE_NOT_FOUND check, but we're already in the rare case
// of corruption here, so the use of QM_OR_ELSE_WARN_IF is ok here.
QM_TRY(QM_OR_ELSE_WARN_IF(
// Expression.
MOZ_TO_RESULT(aUsageFile.Remove(false)),
// Predicate.
([](const nsresult rv) {
return rv == NS_ERROR_FILE_NOT_FOUND ||
rv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST;
return rv == NS_ERROR_FILE_NOT_FOUND;
}),
// Fallback.
ErrToDefaultOk<>));
Expand Down Expand Up @@ -1001,23 +999,20 @@ Result<bool, nsresult> ExistsAsFile(nsIFile& aFile) {
// This is an optimization to check both properties in one OS case, rather
// than calling Exists first, and then IsDirectory. IsDirectory also checks
// if the path exists. QM_OR_ELSE_WARN_IF is not used here since we just want
// to log NS_ERROR_FILE_NOT_FOUND/NS_ERROR_FILE_TARGET_DOES_NOT_EXIST result
// and not spam the reports.
QM_TRY_INSPECT(const auto& res,
QM_OR_ELSE_LOG_VERBOSE_IF(
// Expression.
MOZ_TO_RESULT_INVOKE_MEMBER(aFile, IsDirectory)
.map([](const bool isDirectory) {
return isDirectory ? ExistsAsFileResult::IsDirectory
: ExistsAsFileResult::IsFile;
}),
// Predicate.
([](const nsresult rv) {
return rv == NS_ERROR_FILE_NOT_FOUND ||
rv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST;
}),
// Fallback.
ErrToOk<ExistsAsFileResult::DoesNotExist>));
// to log NS_ERROR_FILE_NOT_FOUND result and not spam the reports.
QM_TRY_INSPECT(
const auto& res,
QM_OR_ELSE_LOG_VERBOSE_IF(
// Expression.
MOZ_TO_RESULT_INVOKE_MEMBER(aFile, IsDirectory)
.map([](const bool isDirectory) {
return isDirectory ? ExistsAsFileResult::IsDirectory
: ExistsAsFileResult::IsFile;
}),
// Predicate.
([](const nsresult rv) { return rv == NS_ERROR_FILE_NOT_FOUND; }),
// Fallback.
ErrToOk<ExistsAsFileResult::DoesNotExist>));

QM_TRY(OkIf(res != ExistsAsFileResult::IsDirectory), Err(NS_ERROR_FAILURE));

Expand Down Expand Up @@ -4146,8 +4141,7 @@ nsresult Connection::EnsureStorageConnection() {
}

nsresult rv = directoryEntry->Remove(false);
if (rv != NS_ERROR_FILE_TARGET_DOES_NOT_EXIST &&
rv != NS_ERROR_FILE_NOT_FOUND && NS_FAILED(rv)) {
if (rv != NS_ERROR_FILE_NOT_FOUND && NS_FAILED(rv)) {
NS_WARNING("Failed to remove database file!");
}
});
Expand Down
41 changes: 18 additions & 23 deletions dom/quota/ActorsParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7178,8 +7178,7 @@ void QuotaManager::DeleteFilesForOrigin(PersistenceType aPersistenceType,
GetDirectoryForOrigin(aPersistenceType, aOrigin), QM_VOID);

nsresult rv = directory->Remove(true);
if (rv != NS_ERROR_FILE_TARGET_DOES_NOT_EXIST &&
rv != NS_ERROR_FILE_NOT_FOUND && NS_FAILED(rv)) {
if (rv != NS_ERROR_FILE_NOT_FOUND && NS_FAILED(rv)) {
// This should never fail if we've closed all storage connections
// correctly...
NS_ERROR("Failed to remove directory!");
Expand Down Expand Up @@ -7245,23 +7244,21 @@ Result<Ok, nsresult> QuotaManager::ArchiveOrigins(
fullOriginMetadata.mOrigin));

// The origin could have been removed, for example due to corruption.
QM_TRY_INSPECT(const auto& moved,
QM_OR_ELSE_WARN_IF(
// Expression.
MOZ_TO_RESULT(directory->MoveTo(
fullOriginMetadata.mPersistenceType ==
PERSISTENCE_TYPE_DEFAULT
? defaultStorageArchiveDir
: temporaryStorageArchiveDir,
u""_ns))
.map([](Ok) { return true; }),
// Predicate.
([](const nsresult rv) {
return rv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST ||
rv == NS_ERROR_FILE_NOT_FOUND;
}),
// Fallback.
ErrToOk<false>));
QM_TRY_INSPECT(
const auto& moved,
QM_OR_ELSE_WARN_IF(
// Expression.
MOZ_TO_RESULT(
directory->MoveTo(fullOriginMetadata.mPersistenceType ==
PERSISTENCE_TYPE_DEFAULT
? defaultStorageArchiveDir
: temporaryStorageArchiveDir,
u""_ns))
.map([](Ok) { return true; }),
// Predicate.
([](const nsresult rv) { return rv == NS_ERROR_FILE_NOT_FOUND; }),
// Fallback.
ErrToOk<false>));

if (moved) {
RemoveQuotaForOrigin(fullOriginMetadata.mPersistenceType,
Expand Down Expand Up @@ -9255,8 +9252,7 @@ void ResetOrClearOp::DeleteFiles(QuotaManager& aQuotaManager) {
nsCOMPtr<nsIFile> directory = directoryOrErr.unwrap();

rv = directory->Remove(true);
if (rv != NS_ERROR_FILE_TARGET_DOES_NOT_EXIST &&
rv != NS_ERROR_FILE_NOT_FOUND && NS_FAILED(rv)) {
if (rv != NS_ERROR_FILE_NOT_FOUND && NS_FAILED(rv)) {
// This should never fail if we've closed all storage connections
// correctly...
MOZ_ASSERT(false, "Failed to remove storage directory!");
Expand All @@ -9274,8 +9270,7 @@ void ResetOrClearOp::DeleteStorageFile(QuotaManager& aQuotaManager) {
QM_VOID);

const nsresult rv = storageFile->Remove(true);
if (rv != NS_ERROR_FILE_TARGET_DOES_NOT_EXIST &&
rv != NS_ERROR_FILE_NOT_FOUND && NS_FAILED(rv)) {
if (rv != NS_ERROR_FILE_NOT_FOUND && NS_FAILED(rv)) {
// This should never fail if we've closed the storage connection
// correctly...
MOZ_ASSERT(false, "Failed to remove storage file!");
Expand Down
6 changes: 2 additions & 4 deletions dom/quota/QuotaCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,8 @@ Result<nsCOMPtr<nsIFile>, nsresult> CloneFileAndAppend(
Result<nsIFileKind, nsresult> GetDirEntryKind(nsIFile& aFile) {
// Callers call this function without checking if the directory already
// exists (idempotent usage). QM_OR_ELSE_WARN_IF is not used here since we
// just want to log NS_ERROR_FILE_NOT_FOUND,
// NS_ERROR_FILE_TARGET_DOES_NOT_EXIST and NS_ERROR_FILE_FS_CORRUPTED results
// and not spam the reports.
// just want to log NS_ERROR_FILE_NOT_FOUND and NS_ERROR_FILE_FS_CORRUPTED
// results and not spam the reports.
QM_TRY_RETURN(QM_OR_ELSE_LOG_VERBOSE_IF(
MOZ_TO_RESULT_INVOKE_MEMBER(aFile, IsDirectory)
.map([](const bool isDirectory) {
Expand All @@ -184,7 +183,6 @@ Result<nsIFileKind, nsresult> GetDirEntryKind(nsIFile& aFile) {
}),
([](const nsresult rv) {
return rv == NS_ERROR_FILE_NOT_FOUND ||
rv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST ||
// We treat NS_ERROR_FILE_FS_CORRUPTED as if the file did not
// exist at all.
rv == NS_ERROR_FILE_FS_CORRUPTED;
Expand Down
5 changes: 1 addition & 4 deletions dom/system/IOUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ namespace mozilla::dom {
* @see nsLocalFileUnix.cpp
*/
static bool IsFileNotFound(nsresult aResult) {
return aResult == NS_ERROR_FILE_NOT_FOUND ||
aResult == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST;
return aResult == NS_ERROR_FILE_NOT_FOUND;
}
/**
* Like |IsFileNotFound|, but checks for known results that suggest a file
Expand Down Expand Up @@ -174,8 +173,6 @@ static void RejectJSPromise(Promise* aPromise, const IOUtils::IOError& aError) {
switch (aError.Code()) {
case NS_ERROR_FILE_UNRESOLVABLE_SYMLINK:
[[fallthrough]]; // to NS_ERROR_FILE_INVALID_PATH
case NS_ERROR_FILE_TARGET_DOES_NOT_EXIST:
[[fallthrough]]; // to NS_ERROR_FILE_INVALID_PATH
case NS_ERROR_FILE_NOT_FOUND:
[[fallthrough]]; // to NS_ERROR_FILE_INVALID_PATH
case NS_ERROR_FILE_INVALID_PATH:
Expand Down
2 changes: 1 addition & 1 deletion dom/xhr/XMLHttpRequestMainThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3968,7 +3968,7 @@ nsresult ArrayBufferBuilder::MapToFileInPackage(const nsCString& aFile,
}
nsZipItem* zipItem = zip->GetItem(aFile.get());
if (!zipItem) {
return NS_ERROR_FILE_TARGET_DOES_NOT_EXIST;
return NS_ERROR_FILE_NOT_FOUND;
}

// If file was added to the package as stored(uncompressed), map to the
Expand Down
1 change: 0 additions & 1 deletion js/xpconnect/src/xpc.msg
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ XPC_MSG_DEF(NS_ERROR_FILE_UNRESOLVABLE_SYMLINK , "File error: Unresolvable
XPC_MSG_DEF(NS_ERROR_FILE_EXECUTION_FAILED , "File error: Execution failed")
XPC_MSG_DEF(NS_ERROR_FILE_UNKNOWN_TYPE , "File error: Unknown type")
XPC_MSG_DEF(NS_ERROR_FILE_DESTINATION_NOT_DIR , "File error: Destination not dir")
XPC_MSG_DEF(NS_ERROR_FILE_TARGET_DOES_NOT_EXIST , "File error: Target does not exist")
XPC_MSG_DEF(NS_ERROR_FILE_COPY_OR_MOVE_FAILED , "File error: Copy or move failed")
XPC_MSG_DEF(NS_ERROR_FILE_ALREADY_EXISTS , "File error: Already exists")
XPC_MSG_DEF(NS_ERROR_FILE_INVALID_PATH , "File error: Invalid path")
Expand Down
10 changes: 5 additions & 5 deletions modules/libjar/nsJAR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ nsJAR::Extract(const nsACString& aEntryName, nsIFile* outFile) {

LOG(("Extract[%p] %s", this, PromiseFlatCString(aEntryName).get()));
nsZipItem* item = mZip->GetItem(PromiseFlatCString(aEntryName).get());
NS_ENSURE_TRUE(item, NS_ERROR_FILE_TARGET_DOES_NOT_EXIST);
NS_ENSURE_TRUE(item, NS_ERROR_FILE_NOT_FOUND);

// Remove existing file or directory so we set permissions correctly.
// If it's a directory that already exists and contains files, throw
Expand Down Expand Up @@ -246,7 +246,7 @@ nsJAR::GetEntry(const nsACString& aEntryName, nsIZipEntry** result) {
return NS_ERROR_FAILURE;
}
nsZipItem* zipItem = mZip->GetItem(PromiseFlatCString(aEntryName).get());
NS_ENSURE_TRUE(zipItem, NS_ERROR_FILE_TARGET_DOES_NOT_EXIST);
NS_ENSURE_TRUE(zipItem, NS_ERROR_FILE_NOT_FOUND);

nsJARItem* jarItem = new nsJARItem(zipItem);

Expand Down Expand Up @@ -310,7 +310,7 @@ nsJAR::GetInputStreamWithSpec(const nsACString& aJarDirSpec,
if (*entry.get()) {
// First check if item exists in jar
item = mZip->GetItem(entry.get());
if (!item) return NS_ERROR_FILE_TARGET_DOES_NOT_EXIST;
if (!item) return NS_ERROR_FILE_NOT_FOUND;
}
nsJARInputStream* jis = new nsJARInputStream();
// addref now so we can call InitFile/InitDirectory()
Expand Down Expand Up @@ -375,7 +375,7 @@ nsresult nsJAR::LoadEntry(const nsACString& aFilename, nsCString& aBuf) {
nsresult rv;
nsCOMPtr<nsIInputStream> manifestStream;
rv = GetInputStream(aFilename, getter_AddRefs(manifestStream));
if (NS_FAILED(rv)) return NS_ERROR_FILE_TARGET_DOES_NOT_EXIST;
if (NS_FAILED(rv)) return NS_ERROR_FILE_NOT_FOUND;

//-- Read the manifest file into memory
char* buf;
Expand Down Expand Up @@ -438,7 +438,7 @@ nsJAREnumerator::HasMore(bool* aResult) {
if (!mName) {
NS_ASSERTION(mFind, "nsJAREnumerator: Missing zipFind.");
nsresult rv = mFind->FindNext(&mName, &mNameLen);
if (rv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) {
if (rv == NS_ERROR_FILE_NOT_FOUND) {
*aResult = false; // No more matches available
return NS_OK;
}
Expand Down
6 changes: 1 addition & 5 deletions modules/libjar/nsJARChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ nsresult nsJARInputThunk::Init() {
rv = mJarReader->GetInputStream(mJarEntry, getter_AddRefs(mJarStream));
}
if (NS_FAILED(rv)) {
// convert to the proper result if the entry wasn't found
// so that error pages work
if (rv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) rv = NS_ERROR_FILE_NOT_FOUND;
return rv;
}

Expand Down Expand Up @@ -281,8 +278,7 @@ nsresult nsJARChannel::CreateJarInput(nsIZipReaderCache* jarCache,
new nsJARInputThunk(reader, mJarURI, mJarEntry, jarCache != nullptr);
rv = input->Init();
if (NS_FAILED(rv)) {
if (rv == NS_ERROR_FILE_NOT_FOUND ||
rv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) {
if (rv == NS_ERROR_FILE_NOT_FOUND) {
CheckForBrokenChromeURL(mLoadInfo, mOriginalURI);
}
return rv;
Expand Down
4 changes: 2 additions & 2 deletions modules/libjar/nsJARInputStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ nsresult nsJARInputStream::InitDirectory(nsJAR* aJar,
mArray.AppendElement(nsCString(name, nameLen));
}

if (rv != NS_ERROR_FILE_TARGET_DOES_NOT_EXIST && NS_FAILED(rv)) {
if (rv != NS_ERROR_FILE_NOT_FOUND && NS_FAILED(rv)) {
return NS_ERROR_FAILURE; // no error translation
}

Expand Down Expand Up @@ -317,7 +317,7 @@ nsresult nsJARInputStream::ReadDirectory(char* aBuffer, uint32_t aCount,
const char* entryName = mArray[mArrPos].get();
uint32_t entryNameLen = mArray[mArrPos].Length();
nsZipItem* ze = mJar->mZip->GetItem(entryName);
NS_ENSURE_TRUE(ze, NS_ERROR_FILE_TARGET_DOES_NOT_EXIST);
NS_ENSURE_TRUE(ze, NS_ERROR_FILE_NOT_FOUND);

// Last Modified Time
PRExplodedTime tm;
Expand Down
4 changes: 2 additions & 2 deletions modules/libjar/nsZipArchive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ nsresult nsZipArchive::Test(const char* aEntryName) {
if (aEntryName) // only test specified item
{
currItem = GetItem(aEntryName);
if (!currItem) return NS_ERROR_FILE_TARGET_DOES_NOT_EXIST;
if (!currItem) return NS_ERROR_FILE_NOT_FOUND;
//-- don't test (synthetic) directory items
if (currItem->IsDirectory()) return NS_OK;
return ExtractFile(currItem, 0, 0);
Expand Down Expand Up @@ -582,7 +582,7 @@ nsresult nsZipFind::FindNext(const char** aResult, uint16_t* aNameLen) {
}
MMAP_FAULT_HANDLER_CATCH(NS_ERROR_FAILURE)
LOG(("ZipHandle::FindNext[%p] not found %s", this, mPattern));
return NS_ERROR_FILE_TARGET_DOES_NOT_EXIST;
return NS_ERROR_FILE_NOT_FOUND;
}

//***********************************************************
Expand Down
2 changes: 1 addition & 1 deletion modules/libjar/test/unit/test_bug1550815.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function run_test() {
zipReader.test("modules/libjar/test/Makefile.in");
Assert.ok(false, "Should not reach here.");
} catch (e) {
Assert.equal(e.result, Cr.NS_ERROR_FILE_TARGET_DOES_NOT_EXIST);
Assert.equal(e.result, Cr.NS_ERROR_FILE_NOT_FOUND);
}

zipReader.close();
Expand Down
Loading

0 comments on commit 057785b

Please sign in to comment.