Skip to content

Commit 1a46154

Browse files
committed
Cleaned the code
1 parent e39fd71 commit 1a46154

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

lib/manager/v2/instances/PhysicalFileSystem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var PhysicalSerializer = (function () {
3333
function PhysicalSerializer() {
3434
}
3535
PhysicalSerializer.prototype.uid = function () {
36-
return 'PhysicalFSSerializer_1.0.0';
36+
return 'PhysicalFSSerializer-1.0.0';
3737
};
3838
PhysicalSerializer.prototype.serialize = function (fs, callback) {
3939
callback(null, {

lib/manager/v2/instances/VirtualFileSystem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ var VirtualSerializer = (function () {
7979
function VirtualSerializer() {
8080
}
8181
VirtualSerializer.prototype.uid = function () {
82-
return 'VirtualFSSerializer_1.0.0';
82+
return 'VirtualFSSerializer-1.0.0';
8383
};
8484
VirtualSerializer.prototype.serialize = function (fs, callback) {
8585
callback(null, fs.resources);

lib/server/v2/commands/Lock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function createLock(ctx, data, callback) {
3131
var type_1 = new LockType_1.LockType(root.find('DAV:locktype').elements[0].name.substr(4).toLowerCase());
3232
var ownerElement = root.find('DAV:owner');
3333
var owner = ownerElement ? ownerElement.elements : null;
34-
var lock_1 = new Lock_1.Lock(new LockKind_1.LockKind(scope, type_1, ctx.server.options.lockTimeout), ctx.user, owner, ctx.headers.depth === undefined ? -1 : ctx.headers.depth);
34+
var lock_1 = new Lock_1.Lock(new LockKind_1.LockKind(scope, type_1, ctx.server.options.lockTimeout), ctx.user ? ctx.user.uid : undefined, owner, ctx.headers.depth === undefined ? -1 : ctx.headers.depth);
3535
var go_1 = function (r, callback) {
3636
r.listDeepLocks(function (e, locks) {
3737
if (e)

src/manager/v2/instances/PhysicalFileSystem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class PhysicalSerializer implements FileSystemSerializer
5252
{
5353
uid() : string
5454
{
55-
return 'PhysicalFSSerializer_1.0.0';
55+
return 'PhysicalFSSerializer-1.0.0';
5656
}
5757

5858
serialize(fs : PhysicalFileSystem, callback : ReturnCallback<any>) : void

src/manager/v2/instances/VirtualFileSystem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export class VirtualSerializer implements FileSystemSerializer
112112
{
113113
uid() : string
114114
{
115-
return 'VirtualFSSerializer_1.0.0';
115+
return 'VirtualFSSerializer-1.0.0';
116116
}
117117

118118
serialize(fs : VirtualFileSystem, callback : ReturnCallback<any>) : void

src/server/v2/commands/Lock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function createLock(ctx : HTTPRequestContext, data : Buffer, callback)
4040
const ownerElement = root.find('DAV:owner');
4141
const owner = ownerElement ? ownerElement.elements : null;
4242

43-
const lock = new Lock(new LockKind(scope, type, ctx.server.options.lockTimeout), ctx.user, owner, ctx.headers.depth === undefined ? -1 : ctx.headers.depth);
43+
const lock = new Lock(new LockKind(scope, type, ctx.server.options.lockTimeout), ctx.user ? ctx.user.uid : undefined, owner, ctx.headers.depth === undefined ? -1 : ctx.headers.depth);
4444

4545
const go = (r : Resource, callback : SimpleCallback) =>
4646
{

src/server/v2/commands/Put.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { HTTPCodes, HTTPMethod, HTTPRequestContext } from '../WebDAVRequest'
22
import { ResourceType, OpenWriteStreamMode } from '../../../manager/v2/fileSystem/CommonTypes'
3-
import { Errors, HTTPError } from '../../../Errors'
3+
import { Errors } from '../../../Errors'
44
import { Readable } from 'stream'
55
import * as path from 'path'
66

src/server/v2/webDAVServer/StartStop.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { HTTPCodes, HTTPRequestContext, HTTPMethod } from '../WebDAVRequest'
22
import { WebDAVServerStartCallback } from './WebDAVServer'
33
import { Writable, Readable } from 'stream'
4-
import { Errors, HTTPError } from '../../../Errors'
4+
import { Errors } from '../../../Errors'
55
import { WebDAVServer } from './WebDAVServer'
66
import { autoSave } from './Persistence'
77
import { IAutoSave } from '../WebDAVServerOptions'

0 commit comments

Comments
 (0)