Skip to content
Snippets Groups Projects
Commit b670ea71 authored by brinn's avatar brinn
Browse files

Allow the client to write anywhere into session workspace, not just a sub-directory.

SVN: 26271
parent b20206f6
No related branches found
No related tags found
No related merge requests found
......@@ -60,11 +60,6 @@ import de.schlichtherle.io.FileOutputStream;
public class DssServiceRpcGeneric extends AbstractDssServiceRpc<IDssServiceRpcGenericInternal>
implements IDssServiceRpcGenericInternal
{
/**
* The sub-directory in the session workspace reserved for clients to drop files.
*/
private static final String CLIENT_DROP_SUB_DIR = "clientDrop";
/**
* Logger with {@link LogCategory#OPERATION} with name of the concrete class, needs to be static
* for our purpose.
......@@ -212,7 +207,7 @@ public class DssServiceRpcGeneric extends AbstractDssServiceRpc<IDssServiceRpcGe
final File workspaceDir =
new SessionWorkspaceProvider(sessionWorkspaceRootDirectory, sessionToken)
.getSessionWorkspace();
final File dir = new File(workspaceDir, FilenameUtils.concat(CLIENT_DROP_SUB_DIR, subDir));
final File dir = new File(workspaceDir, subDir);
dir.mkdirs();
final File file = new File(dir, filename);
OutputStream ostream = null;
......@@ -242,7 +237,7 @@ public class DssServiceRpcGeneric extends AbstractDssServiceRpc<IDssServiceRpcGe
final File workspaceDir =
new SessionWorkspaceProvider(sessionWorkspaceRootDirectory, sessionToken)
.getSessionWorkspace();
final File file = new File(workspaceDir, FilenameUtils.concat(CLIENT_DROP_SUB_DIR, path));
final File file = new File(workspaceDir, path);
FileUtilities.deleteRecursively(file);
return file.exists() == false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment