Grokinstallation corrupts when editing source remotely over AFP
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grok |
Fix Released
|
Medium
|
Martijn Faassen |
Bug Description
If I edit a source file on my production server remotely over an AFP-connection the project is corrupted (I use Textmate). The only solution is to reinstall a new grokproject and copy the source files etc, but it is a royal...
Solution (Martijn and PvW:
If so, I suspect the problem can be fixed in scan.py, in the method 'getSubModuleIn
There's a for loop there:
for entry in sorted(
if you add as the first line in that loop the following:
if entry.startswit
continue
that might fix matters. Should be safe enough to add this to Martian, as Python modules aren't supposed to start with a dot.
In fact, module names have to start with an alphabetic character or an underscore, so we can expand this rule to the following:
if not entry[0].isalpha() and entry[0] != '_':
continue
PvW: Yup, including a test with some of those MacOSX generated resource fork files :).
I guess we could even expand this to testing with a regular expression whether it's a valid Python module name at all...
PvW: Not such a bad idea.
Changed in grok: | |
assignee: | nobody → brandon-rhodes |
milestone: | none → 1.0 |
Changed in grok: | |
assignee: | brandon-rhodes → faassen |
importance: | Undecided → Medium |
status: | New → Fix Committed |
Changed in grok: | |
status: | Fix Committed → Fix Released |
Did you try out the fix I suggested?