Skip to content
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

Error importing file with "\" in the filename #97

Open
GoogleCodeExporter opened this issue Jun 2, 2015 · 4 comments
Open

Error importing file with "\" in the filename #97

GoogleCodeExporter opened this issue Jun 2, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

Steps which will demonstrate the problem:

touch "Bach-Brandenburg Concerto No. 2, \\Andante.mp3"
boar mkrepo /tmp/boar-bug
boar --repo /tmp/boar-bug mksession Demonstration
boar --repo /tmp/boar-bug import . Demonstration


What is the expected output? What do you see instead?

I would expect this to work as it is a valid character (on Linux).
Alternately, as it is *NOT* a valid character on Windows I would expect an 
intelligible error message to that effect.  (FYI Windows is a target platform 
for me so an error message would be a feature.)

Instead I see a stack trace on the import:

Traceback (most recent call last):
  File "/scratch/projects/boar/boar", line 1340, in <module>
    return_code = main()
  File "/scratch/projects/boar/boar", line 1248, in main
    return cmd_import(args[1:])
  File "/scratch/projects/boar/boar", line 634, in cmd_import
    allow_empty = options.allow_empty)
  File "/scratch/projects/boar/workdir.py", line 291, in checkin
    self.get_changes(self.revision, ignore_errors = ignore_errors)
  File "/scratch/projects/boar/workdir.py", line 509, in get_changes
    md5 = self.get_cached_md5sum(fn)
  File "/scratch/projects/boar/workdir.py", line 430, in get_cached_md5sum
    stat = os.stat(abspath)
OSError: [Errno 2] No such file or directory: '/tmp/boar/Bach-Brandenburg 
Concerto No. 2, /Andante.mp3'


What platform are you using? (Windows XP, Windows 7, Linux, ...)

Linux, Ubuntu 10.04.4 LTS (Lucid)

What version of Python are you using?

Python 2.6.5

What version of boar are you using? (Mercurial change id or daily build
date)

Download boar.16-Nov-2012.tar.gz

Please provide any additional information below.

Original issue reported on code.google.com by Flying...@gmail.com on 23 Apr 2013 at 11:57

@GoogleCodeExporter
Copy link
Author

wrong title line.  Problem character is the Linux path separator '/', not '\' 
as listed.  Repeat steps are correct.

Original comment by Flying...@gmail.com on 23 Apr 2013 at 11:59

@GoogleCodeExporter
Copy link
Author

I'm a little bit confused by your last comment. A forward slash "/" is not a 
valid filename character on linux, but backslash is. You probably mean to state 
the issue as it was written originally, right? 

Original comment by ekb...@gmail.com on 23 Apr 2013 at 2:50

@GoogleCodeExporter
Copy link
Author

Yes, go with it as originally written.  Specifically, the "steps to recreate" 
is something I put into a shell script and ran multiple times.  When I remove 
the slash characters the script runs without error.

Original comment by Flying...@gmail.com on 23 Apr 2013 at 2:57

@GoogleCodeExporter
Copy link
Author

Yup, all valid characters should work.

Original comment by ekb...@gmail.com on 23 Apr 2013 at 9:15

  • Changed title: Error importing file with "" in the filename
  • Changed state: Accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant