Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions SMBSync2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
targetSdkVersion 29

//
versionCode 268
versionName "2.37"
versionCode 269
versionName "2.38"

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ public class Constants {
new String[]{"*.aac","*.aif", "*.aifc", "*.aiff", "*.flac", "*.kar", "*.m3u", "*.m4a", "*.mid", "*.midi", "*.mp2",
"*.mp3", "*.mpga", "*.ogg", "*.ra", "*.ram", "*.wav"};
public static final String[] SYNC_FILE_TYPE_IMAGE=
new String[]{"*.bmp", "*.cgm", "*.djv", "*.djvu", "*.gif", "*.ico", "*.ief", "*.jpe", "*.jpeg", "*.jpg", "*.pbm",
new String[]{"*.bmp", "*.cgm", "*.djv", "*.djvu", "*.dng", "*.gif", "*.ico", "*.ief", "*.jpe", "*.jpeg", "*.jpg", "*.pbm",
"*.pgm", "*.png", "*.pnm", "*.ppm", "*.ras", "*.rgb", "*.svg", "*.tif", "*.tiff", "*.wbmp", "*.xbm",
"*.xpm", "*.xwd"};
public static final String[] SYNC_FILE_TYPE_VIDEO=
new String[]{"*.avi", "*.m4u", "*.mov", "*.mp4", "*.movie", "*.mpe", "*.mpeg", "*.mpg", "*.mxu", "*.qt", "*.wmv"};

public static final String[] ARCHIVE_FILE_TYPE=
new String[]{"gif", "jpg", "jpeg", "jpe", "png", "mp4", "mov"};
new String[]{"dng", "gif", "jpg", "jpeg", "jpe", "png", "mp4", "mov"};

}
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public class GlobalParameters extends CommonGlobalParms {

public String settingNoCompressFileType = DEFAULT_NOCOMPRESS_FILE_TYPE;
static final public String DEFAULT_NOCOMPRESS_FILE_TYPE =
"aac;apk;avi;gif;ico;gz;jar;jpe;jpeg;jpg;m3u;m4a;m4u;mov;movie;mp2;mp3;mpe;mpeg;mpg;mpga;png;qt;ra;ram;svg;tgz;wmv;zip;";
"aac;apk;avi;dng;gif;ico;gz;jar;jpe;jpeg;jpg;m3u;m4a;m4u;mov;movie;mp2;mp3;mpe;mpeg;mpg;mpga;png;qt;ra;ram;svg;tgz;wmv;zip;";

public boolean settingSupressAppSpecifiDirWarning = false;
public boolean settingSupressLocationServiceWarning =false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -544,14 +544,17 @@ static private int archiveFileInternalToSmb(SyncThreadWorkArea stwa, SyncTaskIte
if (!sti.isArchiveUseRename()) {//Renameしない
JcifsFile jf=new JcifsFile(converted_to_path+"/"+item.file_name, stwa.targetAuth);
if (jf.exists()) {
String new_name=createArchiveSmbNewFilePath(stwa, sti, converted_to_path, converted_to_path+"/"+to_file_name, to_file_ext) ;
if (new_name.equals("")) {
stwa.util.addLogMsg("E","Archive sequence number overflow error.");
sync_result=SyncTaskItem.SYNC_STATUS_ERROR;
break;
} else {
jf=new JcifsFile(new_name, stwa.targetAuth);
sync_result= moveFileInternalToSmb(stwa, sti, item.full_path, (File)item.file, jf, jf.getPath());
if (SyncThread.isFileChangedForLocalToRemote(stwa, sti, from_path, (File)item.file, jf, stwa.ALL_COPY) &&
SyncThread.checkMasterFileNewerThanTargetFile(stwa, sti, ((File)item.file).getAbsolutePath(), ((File)item.file).lastModified(), jf.getLastModified())) {
String new_name = createArchiveSmbNewFilePath(stwa, sti, converted_to_path, converted_to_path + "/" + to_file_name, to_file_ext);
if (new_name.equals("")) {
stwa.util.addLogMsg("E", "Archive sequence number overflow error.");
sync_result = SyncTaskItem.SYNC_STATUS_ERROR;
break;
} else {
jf = new JcifsFile(new_name, stwa.targetAuth);
sync_result = moveFileInternalToSmb(stwa, sti, item.full_path, (File) item.file, jf, jf.getPath());
}
}
} else {
sync_result= moveFileInternalToSmb(stwa, sti, item.full_path, (File)item.file, jf, jf.getPath());
Expand All @@ -562,14 +565,17 @@ static private int archiveFileInternalToSmb(SyncThreadWorkArea stwa, SyncTaskIte

JcifsFile jf=new JcifsFile(converted_to_path+"/"+temp_dir+to_file_name+to_file_seqno+to_file_ext, stwa.targetAuth);
if (jf.exists()) {
String new_name=createArchiveSmbNewFilePath(stwa, sti, converted_to_path, converted_to_path+"/"+temp_dir+to_file_name+to_file_seqno,to_file_ext) ;
if (new_name.equals("")) {
stwa.util.addLogMsg("E","Archive sequence number overflow error.");
sync_result=SyncTaskItem.SYNC_STATUS_ERROR;
break;
} else {
jf=new JcifsFile(new_name, stwa.targetAuth);
sync_result= moveFileInternalToSmb(stwa, sti, item.full_path, (File)item.file, jf, jf.getPath());
if (SyncThread.isFileChangedForLocalToRemote(stwa, sti, from_path, (File)item.file, jf, stwa.ALL_COPY) &&
SyncThread.checkMasterFileNewerThanTargetFile(stwa, sti, ((File)item.file).getAbsolutePath(), ((File)item.file).lastModified(), jf.getLastModified())) {
String new_name = createArchiveSmbNewFilePath(stwa, sti, converted_to_path, converted_to_path + "/" + temp_dir + to_file_name + to_file_seqno, to_file_ext);
if (new_name.equals("")) {
stwa.util.addLogMsg("E", "Archive sequence number overflow error.");
sync_result = SyncTaskItem.SYNC_STATUS_ERROR;
break;
} else {
jf = new JcifsFile(new_name, stwa.targetAuth);
sync_result = moveFileInternalToSmb(stwa, sti, item.full_path, (File) item.file, jf, jf.getPath());
}
}
} else {
sync_result= moveFileInternalToSmb(stwa, sti, item.full_path, (File)item.file, jf, jf.getPath());
Expand Down Expand Up @@ -1976,14 +1982,17 @@ static private int archiveFileSmbToSmb(SyncThreadWorkArea stwa, SyncTaskItem sti
if (!sti.isArchiveUseRename()) {
JcifsFile tf=new JcifsFile(converted_to_path+"/"+item.file_name, stwa.targetAuth);
if (tf.exists()) {
String new_name=createArchiveSmbNewFilePath(stwa, sti, converted_to_path, converted_to_path+"/"+to_file_name, to_file_ext) ;
if (new_name.equals("")) {
stwa.util.addLogMsg("E","Archive sequence number overflow error.");
sync_result=SyncTaskItem.SYNC_STATUS_ERROR;
break;
} else {
tf=new JcifsFile(new_name, stwa.targetAuth);
sync_result= moveFileSmbToSmb(stwa, sti, item.full_path, (JcifsFile)item.file, tf, tf.getPath(), new_name);
if (SyncThread.isFileChangedForLocalToRemote(stwa, sti, from_path, (File)item.file, tf, stwa.ALL_COPY) &&
SyncThread.checkMasterFileNewerThanTargetFile(stwa, sti, ((File)item.file).getAbsolutePath(), ((File)item.file).lastModified(), tf.getLastModified())) {
String new_name = createArchiveSmbNewFilePath(stwa, sti, converted_to_path, converted_to_path + "/" + to_file_name, to_file_ext);
if (new_name.equals("")) {
stwa.util.addLogMsg("E", "Archive sequence number overflow error.");
sync_result = SyncTaskItem.SYNC_STATUS_ERROR;
break;
} else {
tf = new JcifsFile(new_name, stwa.targetAuth);
sync_result = moveFileSmbToSmb(stwa, sti, item.full_path, (JcifsFile) item.file, tf, tf.getPath(), new_name);
}
}
} else {
sync_result= moveFileSmbToSmb(stwa, sti, item.full_path, (JcifsFile)item.file, tf, tf.getPath(), to_file_name);
Expand All @@ -1994,14 +2003,17 @@ static private int archiveFileSmbToSmb(SyncThreadWorkArea stwa, SyncTaskItem sti

JcifsFile tf=new JcifsFile(converted_to_path+"/"+temp_dir+to_file_name+to_file_seqno+to_file_ext, stwa.targetAuth);
if (tf.exists()) {
String new_name=createArchiveSmbNewFilePath(stwa, sti, converted_to_path, converted_to_path+"/"+temp_dir+to_file_name+to_file_seqno,to_file_ext) ;
if (new_name.equals("")) {
stwa.util.addLogMsg("E","Archive sequence number overflow error.");
sync_result=SyncTaskItem.SYNC_STATUS_ERROR;
break;
} else {
tf=new JcifsFile(new_name, stwa.targetAuth);
sync_result= moveFileSmbToSmb(stwa, sti, item.full_path, (JcifsFile)item.file, tf, tf.getPath(), new_name);
if (SyncThread.isFileChangedForLocalToRemote(stwa, sti, from_path, (File)item.file, tf, stwa.ALL_COPY) &&
SyncThread.checkMasterFileNewerThanTargetFile(stwa, sti, ((File)item.file).getAbsolutePath(), ((File)item.file).lastModified(), tf.getLastModified())) {
String new_name = createArchiveSmbNewFilePath(stwa, sti, converted_to_path, converted_to_path + "/" + temp_dir + to_file_name + to_file_seqno, to_file_ext);
if (new_name.equals("")) {
stwa.util.addLogMsg("E", "Archive sequence number overflow error.");
sync_result = SyncTaskItem.SYNC_STATUS_ERROR;
break;
} else {
tf = new JcifsFile(new_name, stwa.targetAuth);
sync_result = moveFileSmbToSmb(stwa, sti, item.full_path, (JcifsFile) item.file, tf, tf.getPath(), new_name);
}
}
} else {
sync_result= moveFileSmbToSmb(stwa, sti, item.full_path, (JcifsFile)item.file, tf, tf.getPath(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:text="*.gif, *.jpg, *.png, *.mp4, *.mov"
android:text="*.dng, *.gif, *.jpg, *.png, *.mp4, *.mov"
android:textAppearance="?android:attr/textAppearanceMedium" />
<!--android:checkMark="?android:attr/listChoiceIndicatorMultiple"-->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:text="*.gif, *.jpg, *.png, *.mp4, *.mov"
android:text="*.dng, *.gif, *.jpg, *.png, *.mp4, *.mov"
android:textAppearance="?android:attr/textAppearanceMedium" />
<!--android:checkMark="?android:attr/listChoiceIndicatorMultiple"-->

Expand Down