New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calling drop on index causes crash #27
Comments
@sirws would you mind adding you config file? I just want to see what set so I can match it. |
@chelm Bear with me... Are you talking about the \koop-sample-app\config\default.json? |
{ |
@sirws Interesting. Dnt see it locally. It might a windows issue. Whats going on is that "/drop" calls the local file system and tries to remove directories of exported data. It could be that on windows it throws an error where on mac/unix it just ignores it. |
In fact looking at how koop removes dirs might be the issue... https://github.com/Esri/koop/blob/master/lib/Files.js#L173-L180 That seems pretty "linuxy" to me. There may be some way to make that work in both Windows and Linux/Mac. you could try to commented some of that code out. Also I'm curious if you have tried running the koop test suite on windows? |
How does "data_dir": "/usr/local/koop/" translate to windows? Since this isn't a *nix os? Do you think I need to change the data_dir to something more windozy? |
Hahah! No, I haven't run the koop test suite. Is there some good doc on that? |
@sirws oh yes! you are probably right on making the data_dir more windows freindly! I bet thaat might help. To run the tests just:
|
@chelm Well, looking at the code, it is calling rm which is not a windows command. Perhaps I will log a bug to handle that on windows properly. |
right. Im guessing there is a recursive remove dir module that will work on both OS, we could add that as a dep to Koop so that this will work. |
This might work, but looks like it has issues on windows too: https://github.com/isaacs/rimraf |
Are there any local files getting created? I am not seeing any on windows. Not sure where they would be. /koop/socrata/wa/9ubz-5r4b/drop undefined {} {} There is nothing the d:\koop-sample-app\data directory. |
@sirws Files will only get written when an export is created. And actually this raising a new issue about the dir structure. It'd be cleaner if koop contained the file dirs under the item id first. I'll make an issue for that. |
When I call something like:
http://50.18.49.187/koop/socrata/wa/9ubz-5r4b/ + 'drop'...
I get:
Error: spawn rm ENOENT, Error: spawn rm ENOENT, Error: spawn rm ENOENT
This is Koop/Koop-Socrata on windows.
The text was updated successfully, but these errors were encountered: