sources from main repository

This commit is contained in:
Guenter Obiltschnig
2006-12-22 09:31:08 +00:00
parent 15193c3465
commit 772a1021dc
768 changed files with 5910 additions and 840 deletions

View File

@@ -1,7 +1,7 @@
//
// File_WIN32.cpp
//
// $Id: //poco/1.3/Foundation/src/File_WIN32.cpp#1 $
// $Id: //poco/Main/Foundation/src/File_WIN32.cpp#14 $
//
// Library: Foundation
// Package: Filesystem
@@ -74,8 +74,10 @@ FileImpl::FileImpl()
FileImpl::FileImpl(const std::string& path): _path(path)
{
std::string::size_type n = _path.size();
if (n > 0 && (_path[n - 1] == '\\' || _path[n - 1] == '/'))
if (n > 1 && (_path[n - 1] == '\\' || _path[n - 1] == '/') && !((n == 3 && _path[1]==':')))
{
_path.resize(n - 1);
}
}
@@ -93,6 +95,11 @@ void FileImpl::swapImpl(FileImpl& file)
void FileImpl::setPathImpl(const std::string& path)
{
_path = path;
std::string::size_type n = _path.size();
if (n > 1 && (_path[n - 1] == '\\' || _path[n - 1] == '/') && !((n == 3 && _path[1]==':')))
{
_path.resize(n - 1);
}
}
@@ -242,7 +249,7 @@ void FileImpl::setSizeImpl(FileSizeImpl size)
}
void FileImpl::setWriteableImpl(bool flag)
void FileImpl::setWriteableImpl(bool flag)
{
poco_assert (!_path.empty());