mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-04 04:50:22 +00:00
Update func__files() to handle fileSpec directory name without trailing slash
This commit is contained in:
parent
85afb4b84a
commit
35e44a620d
|
@ -643,8 +643,12 @@ qbs *func__files(qbs *qbsFileSpec, int32_t passed) {
|
|||
// Check if fresh arguments were passed and we need to begin a new session
|
||||
if (passed) {
|
||||
std::string fileSpec(reinterpret_cast<char *>(qbsFileSpec->chr), qbsFileSpec->len);
|
||||
filepath_fix_directory(fileSpec);
|
||||
filepath_split(fileSpec, directory, pathName); // split the file path
|
||||
|
||||
if (FS_DirectoryExists(filepath_fix_directory(fileSpec)))
|
||||
directory = fileSpec;
|
||||
else
|
||||
filepath_split(fileSpec, directory, pathName); // split the file path
|
||||
|
||||
entry = FS_GetDirectoryEntryName(fileSpec.c_str());
|
||||
|
||||
if (FS_IsStringEmpty(entry)) {
|
||||
|
|
Loading…
Reference in a new issue