Commit 8cae0242 authored by Marco De Marco's avatar Marco De Marco
Browse files

File path composition modified

parent 5e9bd025
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -337,8 +337,8 @@ void WorkerThread::execQuery(ConnectionManager::SessionSP session_sp,
	//Append file path column to query
	insertQuery << "," << destination_sp->getTable() << ".file_path";
	int month = date.month();
	valuesQuery << ",\'/" << destination_sp->getDirName() << "/"
        << date.year() << "/" << month << "/" << date.day() << "\'";
	valuesQuery << ",\'/" << date.year() << "/" << month << "/" << date.day()
        << "/" << destination_sp->getDirName() << "\'";

	//Append file version column to query
	insertQuery << "," << destination_sp->getTable()  << ".file_version";
@@ -566,9 +566,8 @@ void WorkerThread::moveFile(boost::filesystem::path& origPath,
	//Create directory path, date and version part of destination path
	std::stringstream relPathStream;
	int month = date.month();
	relPathStream << "/" << destination_sp->getDirName()
        << "/" << date.year() << "/" << month
		<< "/" << date.day() << "/" << duplicateMax;
	relPathStream << "/" << date.year() << "/" << month << "/" << date.day()
		<< "/" << destination_sp->getDirName() << "/" << duplicateMax;
	boost::filesystem::path relPath( relPathStream.str() );

	//Append date path to full destination path