Can't open .bzr.log in explorer if path contains spaces

Bug #887170 reported by Alexander Belchenko
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Explorer
Confirmed
Medium
Unassigned

Bug Description

Open the Bazaar menu in Bazaar Explorer, select the Explore sub-menu, and select System Log. A View window opens with an error dialog that shows the following error:
bzr: ERROR: [Error 123] The filename, directory name, or volume label syntax is incorrect: u'"C:\\Documents and Settings\\losolkowski\\My Documents\\.bzr.log"'
The .bzr.log file exists in the C:\Documents and Settings\losolkowski\My Documents folder, and it can be opened in Notepad. Is something configured incorrectly in Bazaar Explorer?

Revision history for this message
Alexander Belchenko (bialix) wrote :

Does your login name (losolkowski) has any non-ascii characters in it?

Changed in bzr-explorer:
status: New → Incomplete
Revision history for this message
Martin Packman (gz) wrote :

Might just be a quoting problem, if it's really trying to open '"filename"' (with double quotes) rather than 'filename'.

Revision history for this message
Alexander Belchenko (bialix) wrote :

"Bazaar - Explore - System Log" works for me with ascii-only login on Windows XP.

Possible dupe https://bugs.launchpad.net/bzr/+bug/887163

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 887170] Re: Can't open .bzr.log in explorer

Martin Packman пишет:
> Might just be a quoting problem, if it's really trying to open
> '"filename"' (with double quotes) rather than 'filename'.

Yes, but it works for me with explorer trunk. I should check with
bundled version of explorer.

--
All the dude wanted was his rug back

Revision history for this message
Larry Osolkowski (losolkowski) wrote : Re: Can't open .bzr.log in explorer

My login name does not have any non-ascii characters in it. I am running Windows XP. Regarding the possible quoting problem, I don't know how the .bzr.log file path name is generated when the Bazaar Explorer System Log menu item is selected.

Revision history for this message
Martin Packman (gz) wrote :

Larry, can you attach the section from your .bzr.log that includes the traceback for this error? You'll need to open it from a different program, obviously. :)

Revision history for this message
Alexander Belchenko (bialix) wrote :

OK, I can reproduce it now with changing path to .bzr.log to the path that contains spaces. I think the problem really in the extra quoting. That's issue could be reported before, I don't remember.

Changed in bzr-explorer:
status: Incomplete → Confirmed
importance: Undecided → Medium
summary: - Can't open .bzr.log in explorer
+ Can't open .bzr.log in explorer if path contains spaces
Revision history for this message
Martin Packman (gz) wrote :

Seems that bug 504842 and bug 828803 are of peripheral interest here, though not directly useful for fixing this issue.

Revision history for this message
Martin Packman (gz) wrote :

Just reverting r449.1.17 from bug 391334 is probably enough to fix this, the code in bzrlib that was working around was fixed several major versions ago. However, not doing argument interpolating in strings like that would be best.

Revision history for this message
Larry Osolkowski (losolkowski) wrote :

Martin, here's the section from my .bzr.log file, although it sounds like you probably don't need it anymore:

Mon 2011-11-07 10:33:18 -0500
0.141 bazaar version: 2.4.1
0.141 bzr arguments: [u'qviewer', u'"C:\\Documents and Settings\\losolkowski\\My Documents\\.bzr.log"']
0.172 looking for plugins in C:/Documents and Settings/losolkowski/Application Data/bazaar/2.0/plugins
0.172 looking for plugins in C:/Program Files/Bazaar/plugins
0.234 encoding stdout as osutils.get_user_encoding() 'cp1252'
0.453 None

0.453 Traceback (most recent call last):
  File "C:/Program Files/Bazaar/plugins\qbzr\lib\cat.py", line 304, in load
  File "bzrlib\osutils.pyo", line 2184, in file_kind
WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect: u'"C:\\Documents and Settings\\losolkowski\\My Documents\\.bzr.log"'

0.453 No Apport available to Bazaar
54.706 return code 0

Revision history for this message
Martin Packman (gz) wrote :

That's helpful Larry, thanks. It looks like bzrlib should treat ERROR_INVALID_NAME from stat as NoSuchFile in file_kind which would at least give a more useful error message.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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