Skip to content

Commit

Permalink
Fixed the spaces in filepath bug!
Browse files Browse the repository at this point in the history
  • Loading branch information
TBye101 committed Aug 29, 2017
1 parent f131c7e commit aa6c18d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
15 changes: 8 additions & 7 deletions CommandEverything/CommandEverythingCPP/CommandCd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,22 @@ void CommandCd::GotoParentDir()
void CommandCd::CdNormal(ParsedCommand* Parsed)
{
string arg = *FilePath;
register size_t i;
register size_t length = Parsed->Words->size();

for (i = 0; i < length; i++)
{
register unsigned __int64 length = Input.size();

if (i != 0)
for (register unsigned __int64 i = 0; i < length; i++)
{
if (Input[i] == 'c' || Input[i] == 'C')
{
arg.append(Parsed->Words->at(i));
arg.append(Input.substr(i + 3));
break;
}
}

if (Files->DoesDirectoryExist(&arg))
{
FilePath->append(Parsed->Words->at(1));
delete FilePath;
FilePath = new string(arg);
FilePath->append("\\");
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
<Filter Include="Framework\WIP Commands">
<UniqueIdentifier>{26f725d9-456e-4da8-aed9-0d553bea28ca}</UniqueIdentifier>
</Filter>
<Filter Include="Framework\WIP Commands\Cd">
<UniqueIdentifier>{f28e51f0-e978-4ed3-8e81-037ef6965cff}</UniqueIdentifier>
</Filter>
<Filter Include="Framework\Commands\List">
<UniqueIdentifier>{3758dd7a-e7f1-4a91-a3c3-bef13afbdf04}</UniqueIdentifier>
</Filter>
Expand Down Expand Up @@ -90,6 +87,9 @@
<Filter Include="Framework\WIP Commands\Chat">
<UniqueIdentifier>{9aeff9bd-ccf8-4276-a17e-36ec183095a6}</UniqueIdentifier>
</Filter>
<Filter Include="Framework\Commands\Cd">
<UniqueIdentifier>{f28e51f0-e978-4ed3-8e81-037ef6965cff}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
Expand Down Expand Up @@ -132,7 +132,7 @@
<Filter>Framework\Commands\List</Filter>
</ClInclude>
<ClInclude Include="CommandCd.h">
<Filter>Framework\WIP Commands\Cd</Filter>
<Filter>Framework\Commands\Cd</Filter>
</ClInclude>
<ClInclude Include="CommandExecute.h">
<Filter>Framework\Commands\Execute</Filter>
Expand Down Expand Up @@ -206,7 +206,7 @@
<Filter>Framework\Commands\List</Filter>
</ClCompile>
<ClCompile Include="CommandCd.cpp">
<Filter>Framework\WIP Commands\Cd</Filter>
<Filter>Framework\Commands\Cd</Filter>
</ClCompile>
<ClCompile Include="CommandExecute.cpp">
<Filter>Framework\Commands\Execute</Filter>
Expand Down

0 comments on commit aa6c18d

Please sign in to comment.