Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DStore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pr1n19
DStore
Commits
f30c9aa6
Commit
f30c9aa6
authored
3 years ago
by
pr1n19
Browse files
Options
Downloads
Patches
Plain Diff
Added file separators between filepath and filename
parent
2bf9e310
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/DStore.java
+2
-2
2 additions, 2 deletions
src/DStore.java
src/StoreThread.java
+1
-1
1 addition, 1 deletion
src/StoreThread.java
with
3 additions
and
3 deletions
src/DStore.java
+
2
−
2
View file @
f30c9aa6
...
@@ -86,7 +86,7 @@ public class DStore {
...
@@ -86,7 +86,7 @@ public class DStore {
fileList
.
add
(
fileName
);
fileList
.
add
(
fileName
);
}
}
case
"LOAD_DATA"
->
//Load file in new thread
case
"LOAD_DATA"
->
//Load file in new thread
new
Thread
(
new
LoadThread
((
fileFolder
+
fileName
),
in
,
out
,
client
)).
start
();
new
Thread
(
new
LoadThread
((
fileFolder
+
File
.
separator
+
fileName
),
in
,
out
,
client
)).
start
();
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
System
.
out
.
println
(
"error "
+
e
);
System
.
out
.
println
(
"error "
+
e
);
...
@@ -111,7 +111,7 @@ public class DStore {
...
@@ -111,7 +111,7 @@ public class DStore {
private
static
void
removeFile
(
String
filePath
,
String
fileName
){
private
static
void
removeFile
(
String
filePath
,
String
fileName
){
//Remove file from folder
//Remove file from folder
File
file
=
new
File
(
filePath
+
fileName
);
File
file
=
new
File
(
filePath
+
File
.
separator
+
fileName
);
file
.
delete
();
file
.
delete
();
//Remove file from list
//Remove file from list
...
...
This diff is collapsed.
Click to expand it.
src/StoreThread.java
+
1
−
1
View file @
f30c9aa6
...
@@ -28,7 +28,7 @@ public class StoreThread implements Runnable{
...
@@ -28,7 +28,7 @@ public class StoreThread implements Runnable{
out
.
write
(
"ACK"
.
getBytes
());
out
.
write
(
"ACK"
.
getBytes
());
//Prepare to write to file
//Prepare to write to file
File
outputFile
=
new
File
(
filePath
+
fileName
);
File
outputFile
=
new
File
(
filePath
+
File
.
separator
+
fileName
);
FileOutputStream
fileOutput
=
new
FileOutputStream
(
outputFile
);
FileOutputStream
fileOutput
=
new
FileOutputStream
(
outputFile
);
//Read correct bytes from input stream and write to file
//Read correct bytes from input stream and write to file
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment