Grokinstallation corrupts when editing source remotely over AFP

Bug #240607 reported by jhsware
12
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 'getSubModuleInfos'.
There's a for loop there:
 for entry in sorted(os.listdir(directory)):
if you add as the first line in that loop the following:
  if entry.startswith('.'):
      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.

Revision history for this message
Martijn Faassen (faassen) wrote : Re: [Bug 240607] [NEW] Grokinstallation corrupts when editing source remotely over AFP

Did you try out the fix I suggested?

Revision history for this message
jhsware (sebastian-urbantalk) wrote :

I only tried the second one, but it worked perfectly! I just wanted to
file a bug so it isn't forgotten.

Mvh Sebastian
08-410 280 41
0707- 577 858

17 jun 2008 kl. 14.23 skrev Martijn Faassen:

> Did you try out the fix I suggested?
>
> --
> Grokinstallation corrupts when editing source remotely over AFP
> https://bugs.launchpad.net/bugs/240607
> You received this bug notification because you are a direct subscriber
> of the bug.

todd (todd-infrae)
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
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.