[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: SVN and PRN and CON files on Windows platform

From: Dave Huang <khym_at_azeotrope.org>
Date: Mon, 24 Sep 2012 03:36:33 -0500

On Mon, Sep 24, 2012 at 12:57:38AM -0500, Ryan Schmidt wrote:

> It's not a bug in Subversion; it's a "feature" (or at least a
> reality that's unlikely to change) of the Windows operating system.
> On Windows, you may not create a file whose name is "PRN", with any
> extension.

Actually, it *is* possible to work around the "feature", although it's
not generally a good idea to do so, and I don't think svn should do
it: you can use the Windows API to create files with the old reserved
DOS device names by prefixing the pathname with "\\?\".

E.g., Start -> Run, notepad \\?\C:\temp\prn.txt , type some text, and
File -> Save. (Substitute C:\temp with the path to a directory that
exists on your machine, of course)

The problem is that while svn could be changed to create a file with
reserved names, almost nothing else will be able to work with the
file. Try finding a program that can do anything with the prn.txt file
created above. You can't even delete it without jumping through hoops
(one way is to open a Command Prompt, and running del
\\?\C:\temp\prn.txt)

-- 
Name: Dave Huang         |  Mammal, mammal / their names are called /
INet: khym_at_azeotrope.org |  they raise a paw / the bat, the cat /
FurryMUCK: Dahan         |  dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 36 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
Received on 2012-09-24 10:37:30 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.