OutpostUniverse / OP2Utility

C++ library for working with Outpost 2 related files and tasks.
MIT License
4 stars 0 forks source link

Prevent resource manager from returning directories #292

Closed Brett208 closed 5 years ago

Brett208 commented 5 years ago

This prevents returning directories from the resource manager. I'm ok with the results.

We had discussed returning directories from the ResourceManager. I have to check if directory contents are filenames or not before returning results from ResourceManager. Otherwise it would invalidate all the filenames returned from the archives.

I we want that functionality currently, perhaps two sets of functions:

I don't think we can use something like GetDirectoryContents because the user wouldn't know if the returned items were directories or files contained in an archive. I guess they could run IsDirectory and IsFilename and anything remaining has to be from an archive, but that seems strange.

I'm fine with this code as is unless there is a desire to solve the issue at this juncture.

Thanks, -Brett

Brett208 commented 5 years ago

Fixed merge conflict with master

DanRStevens commented 5 years ago

This looks like code I've reviewed elsewhere. If so, can you please tag the base branch's PR?

Edit: Looks like it's from PR #291.

Edit2: Maybe this can be rebased on master after merging the other branch.

Brett208 commented 5 years ago

@DanRStevens, my first time rebasing a branch onto current master manually. Hopefully it all worked out.

-Brett