Skip to content

Commit

Permalink
Fixed|libdeng2: Removing native files
Browse files Browse the repository at this point in the history
DirectoryFeed now ignores a native file removal request if the file
does not exist in the native file system.
  • Loading branch information
skyjake committed Dec 16, 2012
1 parent 1e6e5c5 commit 76c98fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions doomsday/libdeng2/src/filesys/directoryfeed.cpp
Expand Up @@ -197,10 +197,11 @@ File *DirectoryFeed::newFile(String const &name)
void DirectoryFeed::removeFile(String const &name)
{
NativePath path = _nativePath / name;

if(!exists(path))
{
/// @throw NotFoundError The file @a name does not exist in the native directory.
throw NotFoundError("DirectoryFeed::removeFile", name + ": not found");
// The file doesn't exist in the native file system, we can ignore this.
return;
}

if(!QDir::current().remove(path))
Expand Down
3 changes: 1 addition & 2 deletions doomsday/libdeng2/src/filesys/folder.cpp
Expand Up @@ -224,8 +224,7 @@ void Folder::removeFile(String const &removePath)
if(originFeed)
{
originFeed->removeFile(removePath);
}

}
}

bool Folder::has(String const &name) const
Expand Down

0 comments on commit 76c98fc

Please sign in to comment.