ofDirectory regression: does not add trailing slash to paths #545

Closed
kylemcdonald opened this Issue Apr 19, 2011 · 3 comments

Comments

Projects
None yet
1 participant
Contributor

kylemcdonald commented Apr 19, 2011

ofDirectory::listDir() really needs to call getPathForDirectory() in the case that someone has forgotten their trailing slash.

the direction of the slash is system dependent, however. poco has a good solution to this that i've wrapped with getPathForDirectory(). personally, i think addTrailingSlash() and addLeadingSlash() are dangerous and should be completely removed.

Contributor

kylemcdonald commented Apr 19, 2011

just noticed some more regressions. that the files weren't being cleared when you opened a new directory. the originalDirectory variable wasn't set, so the paths returned would be missing the proper prefix when you say getPath().

@kylemcdonald kylemcdonald added a commit to kylemcdonald/openFrameworks that referenced this issue Apr 19, 2011

@kylemcdonald kylemcdonald closes #545. checked all the regressions against the dirListExample. 2667923

@kylemcdonald kylemcdonald added a commit to kylemcdonald/openFrameworks that referenced this issue Apr 19, 2011

@kylemcdonald kylemcdonald closes #545. checked all the regressions against the dirListExample. 62ff40e
Contributor

kylemcdonald commented Nov 6, 2011

i think the original issue for this is closed when the commit above was merged, but i found a new one: ofDirectory::getPath(int i) does not return a path with a trailing slash when the path is a directory.

OF should be robust about distinguishing paths with trailing slashes from paths without trailing slashes, but internally it should be consistent about always having a trailing slash to avoid any ambiguity.

Contributor

kylemcdonald commented Dec 12, 2014

closing this since there are other issues dealing with path handling, and a lot of this has been replaced by poco since 2011.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment