Skip to content

Commit

Permalink
fix bug when save text file (#5766)
Browse files Browse the repository at this point in the history
  • Loading branch information
imwhatiam authored Nov 16, 2023
1 parent 9276c53 commit 79448fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/view-file-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import FileView from './components/file-view/file-view';
import SeafileCodeMirror from './components/seafile-codemirror';
import FileViewTip from './components/file-view/file-view-tip';
import { seafileAPI } from './utils/seafile-api';
import { Utils } from './utils/utils';

import './css/text-file-view.css';
const {
Expand Down Expand Up @@ -64,7 +65,7 @@ class ViewFileText extends React.Component {
if (!this.isParticipant) {
this.addParticipant();
}
let dirPath = '/';
let dirPath = Utils.getDirName(filePath);
return (
seafileAPI.getUpdateLink(repoID, dirPath).then((res) => {
const uploadLink = res.data;
Expand Down

0 comments on commit 79448fe

Please sign in to comment.