Commit 5869d2b0 authored by John van Groningen's avatar John van Groningen

undo the previous commit, getDirectoryContents works, however pwd contained a zero char,

caused by inconsistent result of winapi function GetCurrentDirectory
parent b5ed283a
......@@ -43,13 +43,12 @@ doCpmAction _ _ _ world =
*/
doMake :: String !String !*World -> *World
doMake cleanhome pwd world
# directory_contents_path = IF_WINDOWS (pwd+++"\\*.prj") pwd
((ok,pwd_path),world) = pd_StringToPath directory_contents_path world
# ((ok,pwd_path),world) = pd_StringToPath pwd world
| not ok
= error "Failed to read current directory" world
= error ("Failed to read current directory ("+++pwd+++")") world
# ((err,entries), world) = getDirectoryContents pwd_path world
| err<>NoDirError
= error "Failed to read current directory" world
= error ("Failed to read current directory ("+++pwd+++")") world
# xs = [e \\ {fileName=e}<-entries
| size e>=4 && e.[size e-4]=='.' && e.[size e-3]=='p' && e.[size e-2]=='r' && e.[size e-1]=='j']
| isEmpty xs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment