A prior patch from Kevin Light under bug 244308 fixes the case of Olive crashing if the current working directory is on a mapped drive. A more recent bug 250804 also identifies the problem exists for removable drives (e.g. USB sticks) as well. The attached patch (against trunk) corrects that problem.

I'm brand new with Bazaar so I don't know if it would cause other problems, but it seems that all drives that can be reached should be included. In that case, the check could be changed to accept any drive that returns a code greater than 1 (return code 0 is win32file.DRIVE_UNKNOWN and 1 is win32file.DRIVE_NO_ROOT_DIR, the latter being what is returned when the drive doesn't exist).

Note I'm not a member of this list but I understand that patches can still be submitted.

Dennis
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: [EMAIL PROTECTED]
#   s92p2z2qb2p2nrel
# target_branch: lp:bzr-gtk
# testament_sha1: ec939c46447368e3ff02636ba746f3ab0e5ecd91
# timestamp: 2008-08-02 18:08:37 -0600
# base_revision_id: [EMAIL PROTECTED]
#   4nnen5crzj0r9zao
# 
# Begin patch
=== modified file 'olive/__init__.py'
--- olive/__init__.py   2008-07-25 19:54:31 +0000
+++ olive/__init__.py   2008-08-03 00:08:00 +0000
@@ -1378,7 +1378,8 @@
         driveletters = []
         for drive in string.ascii_uppercase:
             if win32file.GetDriveType(drive+':') == win32file.DRIVE_FIXED or\
-                win32file.GetDriveType(drive+':') == win32file.DRIVE_REMOTE:
+                win32file.GetDriveType(drive+':') == win32file.DRIVE_REMOTE or\
+                win32file.GetDriveType(drive+':') == win32file.DRIVE_REMOVABLE:
                 driveletters.append(drive+':')
         return driveletters
     

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWVFTAXkAAZzfgAAUUev//3am
lQS////wUAOj3Ryt3KXZ2m4SiIps1Gkz1Gp6ZT01NGnqGQMgxMTTaIJJITZCMk3pT0NQ00BoaAAG
gASSaJqaJ6Ag2pptR6nqA0AAAAHMABMmABMJgmEMARgASUENMRJPyU/SYRo2hJo2mmoNA0aHqXn0
TLswaiVmeFOoVHLO+hsAFELJ6OhzwITdb3ymhyqpt1n7BaU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k mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.canonical.com/mailman/listinfo/bzr-gtk

Reply via email to