We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b37b222 commit ea8412bCopy full SHA for ea8412b
ssu_rsync.c
@@ -157,7 +157,7 @@ int main(int argc, char *argv[])
157
exit(1);
158
}
159
160
- strncpy(swap_path, dst_path, strlen(dst_path) - strlen(get_file_name(dst_path)));
+ strncpy(swap_path, dst_path, get_file_name(dst_path) - dst_path);
161
#ifdef DEBUG
162
printf("ssu_rsync(): cd %s\n", swap_path);
163
#endif
@@ -172,7 +172,11 @@ int main(int argc, char *argv[])
172
chdir(pwd); // 실행 경로로 복귀
173
signal(SIGINT, recovery); // SIGINT 시그널 처리
174
syncronize(src_path, dst_path); // 동기화
175
- remove(swap_path); // swap 파일 삭제
+ sprintf(swap_path, "%s.swp", dst_path);
176
+#ifdef DEBUG
177
+ printf("ssu_rsync(): swap_path = %s\n", swap_path);
178
+#endif
179
+ unlink(swap_path); // swap 파일 삭제
180
181
gettimeofday(&end_t, NULL); // 측정 종료
182
ssu_runtime(&begin_t, &end_t); // 실행 시간 출력
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments