diff options
author | Mark Spruiell <mes@zeroc.com> | 2010-05-28 15:21:24 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2010-05-28 15:21:24 -0700 |
commit | 74581003486030ea874707085d5bf7cdce28f501 (patch) | |
tree | b6007dfaeb37919c52e84dbd6454528e8b914a6f /config/makeprops.py | |
parent | Bug 4754 - VS plugin properties not working with VS2010 (diff) | |
download | ice-74581003486030ea874707085d5bf7cdce28f501.tar.bz2 ice-74581003486030ea874707085d5bf7cdce28f501.tar.xz ice-74581003486030ea874707085d5bf7cdce28f501.zip |
bug 4714 - FreezeScript utilities do not work on an open environment
Diffstat (limited to 'config/makeprops.py')
-rwxr-xr-x | config/makeprops.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/config/makeprops.py b/config/makeprops.py index 57c6aff2861..183113c5394 100755 --- a/config/makeprops.py +++ b/config/makeprops.py @@ -373,8 +373,13 @@ const IceInternal::PropertyArray """ % { 'className' : self.className, 'section': self.currentSection }) def moveFiles(self, location): - shutil.move(self.className + ".h", os.path.join(location, "cpp", "src", "Ice")) - shutil.move(self.className + ".cpp", os.path.join(location, "cpp", "src", "Ice")) + dest = os.path.join(location, "cpp", "src", "Ice") + if os.path.exists(os.path.join(dest, self.className + ".h")): + os.remove(os.path.join(dest, self.className + ".h")) + if os.path.exists(os.path.join(dest, self.className + ".cpp")): + os.remove(os.path.join(dest, self.className + ".cpp")) + shutil.move(self.className + ".h", dest) + shutil.move(self.className + ".cpp", dest) class JavaPropertyHandler(PropertyHandler): def __init__(self, inputfile, c): @@ -441,7 +446,10 @@ class JavaPropertyHandler(PropertyHandler): self.srcFile.write(" };\n\n") def moveFiles(self, location): - shutil.move(self.className + ".java", os.path.join(location, "java", "src", "IceInternal")) + dest = os.path.join(location, "java", "src", "IceInternal") + if os.path.exists(os.path.join(dest, self.className + ".java")): + os.remove(os.path.join(dest, self.className + ".java")) + shutil.move(self.className + ".java", dest) class CSPropertyHandler(PropertyHandler): def __init__(self, inputfile, c): @@ -503,7 +511,10 @@ class CSPropertyHandler(PropertyHandler): self.srcFile.write("\n") def moveFiles(self, location): - shutil.move(self.className + ".cs", os.path.join(location, "cs", "src", "Ice")) + dest = os.path.join(location, "cs", "src", "Ice") + if os.path.exists(os.path.join(dest, self.className + ".cs")): + os.remove(os.path.join(dest, self.className + ".cs")) + shutil.move(self.className + ".cs", dest) class MultiHandler(PropertyHandler): def __init__(self, inputfile, c): |